summaryrefslogtreecommitdiff
path: root/config/essentials/shell
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-04-16 10:04:31 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-04-16 10:05:26 +0200
commit197a1a74f468d9d69d624b19f90280a3946455e5 (patch)
tree2f896d32076238fb0affce00fb76ba84de11d43a /config/essentials/shell
parentf9614db5736fdbc9fcf4795d63f3906e8a08ae4d (diff)
update
Diffstat (limited to 'config/essentials/shell')
-rw-r--r--config/essentials/shell/functions.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh
index ce02490..fa32446 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 "${2:-https://upfast.cronyakatsuki.xyz/delete/$1}"; }
upfile() { curl -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"
+ }