diff options
Diffstat (limited to 'config/essentials')
-rw-r--r-- | config/essentials/shell/functions.sh | 10 | ||||
-rw-r--r-- | config/essentials/zsh/.zshrc | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh index 250d049..f8b764a 100644 --- a/config/essentials/shell/functions.sh +++ b/config/essentials/shell/functions.sh @@ -68,7 +68,10 @@ sms() { ssh -t phone sendmsg "$1" "'$2'"; } trcp() { scp "$1" db:/media/basilisk/downloads/transmission/torrents/; } rln() { ln -s "$(readlink -f "$1")" "$2"; } getgit() { git clone git@db:"$1"; } + esc() { eval "$EDITOR '$(which $1)'"; } +compdef esc="which" + delfile() { curl -s "${2:-https://upfast.cronyakatsuki.xyz/delete/$1}"; } upfile() { curl -s -F "file=@\"$1\"" "${2:-https://0x0.st}"; } to_webm() { ffmpeg -y -i "$1" -vcodec libvpx -cpu-used -12 -deadline realtime "${1%.*}".webm; } @@ -292,3 +295,10 @@ edit_in_dir() { [ -f "$file" ] || return 1 $EDITOR "$file" } + +wgtoggle() { + d="${1:-wg0}" + ip -br a | awk '{print $1}' | grep "$d" > /dev/null && + doas wg-quick down "$d" || + doas wg-quick up "$d" + } diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index ccec6d5..c9bf8b1 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -18,9 +18,9 @@ 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/comp.zsh . $XDG_CONFIG_HOME/zsh/widgets.zsh # . $XDG_CONFIG_HOME/zsh/prompt.zsh # . $XDG_CONFIG_HOME/zsh/plugins.zsh |