From 48f21cd4a0110b468d533b99da64782c0bbf3b07 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Wed, 6 Jul 2022 09:10:13 +0200 Subject: [PATCH] config: add server bin dir --- .config/shell/functions | 3 +++ .config/shell/server | 7 ++++++- .config/yadm/unignore | 2 +- .local/bin/scripts/edconf | 2 +- .local/bin/scripts/onkyo | 5 ----- .local/bin/{scripts => server}/zulip | 0 .zshenv | 6 +++--- 7 files changed, 14 insertions(+), 11 deletions(-) delete mode 100755 .local/bin/scripts/onkyo rename .local/bin/{scripts => server}/zulip (100%) diff --git a/.config/shell/functions b/.config/shell/functions index e664444..e24895b 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -313,6 +313,9 @@ npm-reinstall() { npm install } +# Reconnect to ONKYO since it is buggy +alias onkyo='bluetoothctl disconnect 00:09:B0:1D:DC:98 && sleep 1 && bluetoothctl connect 00:09:B0:1D:DC:98' + # Custom tools {{{1 sedcomment() { sed -i "s/$1/#\0/" "${@:2}"; } diff --git a/.config/shell/server b/.config/shell/server index 9a8ddd9..7e93091 100644 --- a/.config/shell/server +++ b/.config/shell/server @@ -1,3 +1,8 @@ +test -z "$DISPLAY" || return 0 + +PATH="$PATH:$HOME/.local/bin/server" + +## STACKSPIN export STACKSPIN="${STACKSPIN:-$HOME/projects/stackspin}" _stackspin_cluster_cache=/var/tmp/stackspin-cluster @@ -7,7 +12,7 @@ _stackspin_cluster_cache=/var/tmp/stackspin-cluster # Presumes a mapping like the following in your ssh config: # Host example.org # Hostname [IP] -# This is a function so it can change directory +# This is a function so it can change directory. stack() { test $# -lt 1 && builtin cd "$STACKSPIN" && diff --git a/.config/yadm/unignore b/.config/yadm/unignore index f6348fe..f47da36 100644 --- a/.config/yadm/unignore +++ b/.config/yadm/unignore @@ -5,4 +5,4 @@ $XDG_CONFIG_HOME/nvim $XDG_CONFIG_HOME/espanso $XDG_CONFIG_HOME/zsh/completion $CONFIG_SHELLS -$HOME/.local/bin/scripts +$HOME/.local/bin/*/ diff --git a/.local/bin/scripts/edconf b/.local/bin/scripts/edconf index b2e2f70..aa7cfdb 100755 --- a/.local/bin/scripts/edconf +++ b/.local/bin/scripts/edconf @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh # Find config files with fzf, preview and edit them # Common config files are automatically checked/reloaded alias dedup='awk '"'"'!a[$0]++'"'" diff --git a/.local/bin/scripts/onkyo b/.local/bin/scripts/onkyo deleted file mode 100755 index d9e474e..0000000 --- a/.local/bin/scripts/onkyo +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# Reconnect to ONKYO since it is buggy -bluetoothctl disconnect 00:09:B0:1D:DC:98 -sleep 1 -bluetoothctl connect 00:09:B0:1D:DC:98 diff --git a/.local/bin/scripts/zulip b/.local/bin/server/zulip similarity index 100% rename from .local/bin/scripts/zulip rename to .local/bin/server/zulip diff --git a/.zshenv b/.zshenv index 88a50a9..0d29396 100644 --- a/.zshenv +++ b/.zshenv @@ -62,8 +62,8 @@ export CONFIG_SHELLS="$XDG_CONFIG_HOME"/shell mkdir -p "$XDG_STATE_HOME/zsh" # environment -BIN="$HOME/.local/bin/scripts" -export PATH="$BIN:$HOME/.local/bin:$PATH:$XDG_CONFIG_HOME/emacs/bin:$GOPATH/bin:$XDG_DATA_HOME/gem/ruby/3.0.0/bin:$ANDROID_SDK_ROOT/platform-tools:$CARGO_HOME/bin" +BIN="$HOME/.local/bin" +export PATH="$BIN/scripts:$BIN:$PATH:$XDG_CONFIG_HOME/emacs/bin:$GOPATH/bin:$XDG_DATA_HOME/gem/ruby/3.0.0/bin:$ANDROID_SDK_ROOT/platform-tools:$CARGO_HOME/bin" export ALTERNATE_EDITOR="$( if which nvim >/dev/null then echo nvim @@ -71,7 +71,7 @@ export ALTERNATE_EDITOR="$( fi)" export EDITOR="$( if which emacs >/dev/null - then echo $BIN/emacstty + then echo $BIN/scripts/emacstty else echo $ALTERNATE_EDITOR fi )"