summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/extra/curszip2
-rwxr-xr-xbin/guiscripts/lh1
-rw-r--r--config/essentials/shell/functions.sh10
-rw-r--r--config/essentials/zsh/.zshrc2
-rw-r--r--config/extra/tridactyl/tridactylrc1
-rw-r--r--config/home/.zshenv2
6 files changed, 15 insertions, 3 deletions
diff --git a/bin/extra/curszip b/bin/extra/curszip
index 22453ae..64abdb6 100755
--- a/bin/extra/curszip
+++ b/bin/extra/curszip
@@ -2,7 +2,7 @@
list1() { find "$1" -mindepth 1 -maxdepth 1 -type "${2:-d}" -printf '%f\n'; }
-curs="$(list1 ~/docs/school/Vakken | fzf)"
+curs="$(list1 ~/docs/school/Vakken | commander -c)"
[ "$curs" ] || exit 1
zip="$(list1 ~/dl f | fzf -f "$curs" | grep '\.zip$')"
>&2 printf "curs: %s\n" "$curs"
diff --git a/bin/guiscripts/lh b/bin/guiscripts/lh
index ed5af47..ba39ec0 100755
--- a/bin/guiscripts/lh
+++ b/bin/guiscripts/lh
@@ -8,7 +8,6 @@
[ "${url:=$1}" ] || url="$(clipo)"
notify-send "linkhandler" "$url"
-echo "$url" > ~/file.txt
case "$url" in
file://*)
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
diff --git a/config/extra/tridactyl/tridactylrc b/config/extra/tridactyl/tridactylrc
index 1a96af5..5b8bd54 100644
--- a/config/extra/tridactyl/tridactylrc
+++ b/config/extra/tridactyl/tridactylrc
@@ -35,6 +35,7 @@ set searchurls.y https://www.youtube.com/results?search_query=%s
bind J tabnext
bind K tabprev
+bind i filldmcdline bmarks
bind goc open https://chat.openai.com/chat
bind gnc winopen https://chat.openai.com/chat
bind gpc tabopen https://chat.openai.com/chat
diff --git a/config/home/.zshenv b/config/home/.zshenv
index 745f8bf..665993a 100644
--- a/config/home/.zshenv
+++ b/config/home/.zshenv
@@ -64,6 +64,8 @@ export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS'
--color=info:#b48ead,prompt:#bf6069,pointer:#b48dac
--color=marker:#a3be8b,spinner:#ebcb8b,header:#a3be8b'
+export LESS="-j 4 -i"
+
# Colored manpages
export MANPAGER="less -R --use-color -Dd+r -Du+b"
export MANROFFOPT="-P -c"