diff --git a/config/foot/foot.ini b/config/foot/foot.ini index d294f52..792c110 100644 --- a/config/foot/foot.ini +++ b/config/foot/foot.ini @@ -1,4 +1,4 @@ font=M+ 2m:size=12 [url] -launch=rifle ${url} +launch=wl-copy --primary ${url} diff --git a/local/bin/clirail b/local/bin/clirail index 2b60d8c..bfdf153 120000 --- a/local/bin/clirail +++ b/local/bin/clirail @@ -1 +1 @@ -/home/ninewise/.local/pipx/venvs/clirail/bin/clirail \ No newline at end of file +/home/ninewise/.local/share/pipx/venvs/clirail/bin/clirail \ No newline at end of file diff --git a/local/bin/delegator b/local/bin/delegator index 9728e6a..d1a5945 100755 --- a/local/bin/delegator +++ b/local/bin/delegator @@ -82,10 +82,6 @@ case "$choice" in choice="$(cd ~/.password-store/otp; find * -name '*.gpg' | sed 's/\.gpg$//' | sort -d | pick)" inject "$(pass otp code otp/"$choice" | head -1)" ;; -'student') - choice="$(pick < ~/.local/share/students.list)" - inject "$choice" - ;; 'curl') d="$(mktemp -d)" trap "rm -r '$d'" EXIT KILL @@ -93,9 +89,6 @@ case "$choice" in curl -LOJ "$(primary)" rifle -fF * ;; -'clipmenu') - exec clipmenu - ;; 'yubikey') choice="$(ykman oath accounts list | pick)" inject "$(ykman oath accounts code -s "$choice")" @@ -107,22 +100,4 @@ case "$choice" in 'spotify-title') inject "$(curl -L "$(clip)" | sed -n 's@.*\(.*\) - song \(and lyrics \)\?by \(.*\) | Spotify.*@\1 _van_ \3@p')" ;; -'youtube-dl') - d="$(mktemp -d)" - trap "rm -r '$d'" EXIT KILL - cd "$d" - yt-dlp "$(primary)" - if mplayer -v >/dev/null; then - exec st mplayer * - else - exec st mpv * - fi - ;; -'audio-dl') - d="$(mktemp -d)" - trap "rm -r '$d'" EXIT KILL - cd "$d" - yt-dlp -x "$(primary)" - exec st mpv --no-video * - ;; esac diff --git a/services/mailsync/run b/services/mailsync/run index 23fb0fc..c0a28a5 100755 --- a/services/mailsync/run +++ b/services/mailsync/run @@ -6,10 +6,10 @@ export DISPLAY=":0" set -e # Don't sync mails while composing -! pgrep -f mcom > /dev/null -! pgrep -f mfwd > /dev/null -! pgrep -f mbnc > /dev/null -! pgrep -f mrep > /dev/null +if pgrep -f mcom > /dev/null; then exit; fi +if pgrep -f mfwd > /dev/null; then exit; fi +if pgrep -f mbnc > /dev/null; then exit; fi +if pgrep -f mrep > /dev/null; then exit; fi # Split outbox emails mlist -d /data/mail/outbox | mpick -t 'from =~~ "posteo"' | mflag -F | mrefile /data/mail/posteo/Sent @@ -31,7 +31,7 @@ fi # Incorporate new mails and store them in the temp sequence s="$(mktemp)" trap "rm '$s'" EXIT KILL -minc $(mdirs /data/mail) > "$s" +mdirs /data/mail | minc > "$s" { # Ignores diff --git a/zshrc b/zshrc index 3fc8cde..f6cefde 100644 --- a/zshrc +++ b/zshrc @@ -80,7 +80,7 @@ agenda() { } magnet() { - ssh Tumbrel "transmission-remote --add '$(xclip -sel c -o)'" + ssh Tumbrel "transmission-remote --add '$(wl-paste)'" } # Ledger @@ -103,3 +103,17 @@ go() { terminfo() { infocmp -x | ssh $@ 'cat > $TERM.info && tic -x $TERM.info && rm $TERM.info' } + +# Emit OSC 7 cwd so foot can open new windows in current directory +osc7-pwd() { + emulate -L zsh # also sets localoptions for us + setopt extendedglob + local LC_ALL=C + printf '\e]7;file://%s%s\e\' $HOST ${PWD//(#m)([^@-Za-z&-;_~])/%${(l:2::0:)$(([##16]#MATCH))}} +} + +chpwd-osc7-pwd() { + (( ZSH_SUBSHELL )) || osc7-pwd +} +autoload -Uz add-zsh-hook +add-zsh-hook -Uz chpwd chpwd-osc7-pwd