diff options
Diffstat (limited to 'config/essentials')
-rw-r--r-- | config/essentials/shell/aliases.sh | 9 | ||||
-rw-r--r-- | config/essentials/shell/functions.sh | 13 | ||||
-rw-r--r-- | config/essentials/vis/plugins/vis-snippets/init.lua | 0 | ||||
-rw-r--r-- | config/essentials/vis/visrc.lua | 1 | ||||
-rw-r--r-- | config/essentials/zsh/.zshrc | 13 |
5 files changed, 15 insertions, 21 deletions
diff --git a/config/essentials/shell/aliases.sh b/config/essentials/shell/aliases.sh index be35a6c..ddc605a 100644 --- a/config/essentials/shell/aliases.sh +++ b/config/essentials/shell/aliases.sh @@ -3,7 +3,8 @@ # The most important one alias vi='vis' -alias cd='z' +which z > /dev/null 2>&1 && + alias cd='z' # Zsh specific aliases if [ $SHELL = "/bin/zsh" ] @@ -53,7 +54,8 @@ alias pf='profanity' alias f='fg' -alias gurk='pgrep gurk > /dev/null && printf "Already Running.\n" || gurk' +which gurk > /dev/null 2>&1 && + alias gurk='pgrep gurk > /dev/null && printf "Already Running.\n" || gurk' alias arduino-cli='arduino-cli --config-file $XDG_CONFIG_HOME/arduino15/arduino-cli.yaml' @@ -162,9 +164,6 @@ alias wtip='wt ip -c -brief addr' alias fusephone='sshfs myphone: /media/phone' alias ttyper='ttyper -l english1000' -alias wgup='doas wg-quick up wg0' -alias wgdown='doas wg-quick down wg0' - # NPM alias npi="npm init --yes" diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh index 976db1e..1b69fbd 100644 --- a/config/essentials/shell/functions.sh +++ b/config/essentials/shell/functions.sh @@ -306,7 +306,7 @@ gdown () { } # toggle wireguard vpn on $1 -> interface -wgtoggle() { +wgt() { d="${1:-wg0}" ip -br a | awk '{print $1}' | grep "$d" > /dev/null && doas wg-quick down "$d" || @@ -318,17 +318,10 @@ serve() { if [ "$1" ] then logn "Serving $1" - docker container run \ - --rm \ - --volume "$(readlink -f "$1")":/data \ - --publish 80:5000 sigoden/dufs /data + dufs "$1" else - logn "Receiving files.." - docker container run \ - --rm \ - --volume /tmp/data:/data \ - --publish 80:5000 sigoden/dufs /data --allow-upload + dufs /tmp/data --alow-upload fi } diff --git a/config/essentials/vis/plugins/vis-snippets/init.lua b/config/essentials/vis/plugins/vis-snippets/init.lua new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/config/essentials/vis/plugins/vis-snippets/init.lua diff --git a/config/essentials/vis/visrc.lua b/config/essentials/vis/visrc.lua index a424613..1813888 100644 --- a/config/essentials/vis/visrc.lua +++ b/config/essentials/vis/visrc.lua @@ -5,6 +5,7 @@ require('vis') require('plugins/vis-cursors') require('plugins/vis-title') +require('plugins/vis-snippets') ------------------------------------ --- EVENTS diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 8aa9f5e..5981fd9 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -7,8 +7,6 @@ then [ "${TTY%%tty*}" = '/dev/' ] && clear case "${TTY#/dev/tty}" in 1) exec startx > /dev/null 2>&1 ;; - 2) exec startdwl > /dev/null 2>&1 ;; - 3) exec startw > /dev/null 2>&1 ;; *) false ;; esac && exit fi @@ -18,10 +16,12 @@ autoload -z edit-command-line zle -N edit-command-line ### Source files -. $XDG_CONFIG_HOME/zsh/comp.zsh -. $XDG_CONFIG_HOME/shell/functions.sh -. $XDG_CONFIG_HOME/shell/aliases.sh -. $XDG_CONFIG_HOME/zsh/widgets.zsh +source_it() { [ -f "$1" ] && . "$1" } +source_it /etc/profile.d/plan9.sh +source_it $XDG_CONFIG_HOME/zsh/comp.zsh +source_it $XDG_CONFIG_HOME/shell/functions.sh +source_it $XDG_CONFIG_HOME/shell/aliases.sh +source_it $XDG_CONFIG_HOME/zsh/widgets.zsh # . $XDG_CONFIG_HOME/zsh/prompt.zsh # . $XDG_CONFIG_HOME/zsh/plugins.zsh @@ -31,6 +31,7 @@ eval "$(zoxide init zsh)" ### Plugins [ -f "$HOME/.local/share/zap/zap.zsh" ] && source "$HOME/.local/share/zap/zap.zsh" +# plug "MichaelAquilina/zsh-you-should-use" plug "chivalryq/git-alias" # plug "marlonrichert/zsh-autocomplete" plug "zap-zsh/fzf" |