diff --git a/.config/lf/rifle.conf b/.config/lf/rifle.conf index 1f1dec421..8dd86eacc 100644 --- a/.config/lf/rifle.conf +++ b/.config/lf/rifle.conf @@ -17,7 +17,8 @@ ext x?html?, has w3m, terminal = w3m "$@" #------------------------------------------- # Misc #------------------------------------------- -# HACK: This '-- --' fixes nvim's argument parsing when given empty files and executed with --embed +# HACK: This '-- --' fixes nvim's argument parsing when given empty files. +# Unfortunately I have no idea what's causing this bug. label editor, mime ^text|x-empty$, env EMBEDDED = ${VISUAL:-$EDITOR} -- -- "$@" label editor, mime ^text|x-empty$ = ${VISUAL:-$EDITOR} -- "$@" label pager, mime ^text|x-empty$ = $PAGER -- "$@" diff --git a/.config/zsh/configs/aliases b/.config/zsh/configs/aliases index dbb34cdde..ef8be508f 100644 --- a/.config/zsh/configs/aliases +++ b/.config/zsh/configs/aliases @@ -49,7 +49,7 @@ alias \ xr="xbps-remove" \ xsi='() { xpkg -a | \ - fzf -q "${1}" -m --preview \ + fzf -q ${1:-""} -m --preview \ "xq {1} | \grep -e pkgver -e license -e short_desc -e installed_size -e maintainer -e repository -e homepage" \ --preview-window=right:66%:wrap | xargs -ro xi }' diff --git a/.config/zsh/configs/vars b/.config/zsh/configs/vars index d9888a088..80836dc08 100644 --- a/.config/zsh/configs/vars +++ b/.config/zsh/configs/vars @@ -2,4 +2,3 @@ HISTSIZE=10000000 SAVEHIST=10000000 HISTFILE="$XDG_DATA_HOME/zsh/history" KEYTIMEOUT=1 -LF_PREVIEW_TYPE=sixel # sixel | ueberzug | *chafa* diff --git a/.local/bin/opener b/.local/bin/opener index d6257b690..1dc457283 100755 --- a/.local/bin/opener +++ b/.local/bin/opener @@ -1,11 +1,18 @@ #!/bin/sh +# shellcheck disable=2154 + +[ -n "$TAOLF" ] && { + lf -remote "send $id toggle $(printf "'%s'" "$@"); open" +} term= -[ -n "$SCRATCHPAD" ] && { set -- -ft "$@"; term="$TERMCMD -e"; } +[ -n "$SCRATCHPAD" ] && { + set -- -ft "$@" + term="$TERMCMD -e" +} -# HACK: workaround for an nvim --embed bug +# HACK: workaround for an nvim/taolf bug with opening empty files [ "$(rifle -c "$XDG_CONFIG_HOME/lf/rifle.conf" | head -1 | cut -d ':' -f 2)" = "editor" ] && $term vim "$@" set -- -p0 -c "$XDG_CONFIG_HOME/lf/rifle.conf" "$@" - rifle "$@" diff --git a/.local/libexec/dwm/autorun b/.local/libexec/dwm/autorun index 90affe43e..787103e3c 100755 --- a/.local/libexec/dwm/autorun +++ b/.local/libexec/dwm/autorun @@ -1,5 +1,7 @@ #!/bin/sh +# TODO: Replace this script with tini + trap 'kill $pids $(pidof xcape) 1>/dev/null 2>&1' 2 15 EXIT LOGFILE="${LOGFILE:-${HOME}/.local/log/session-$(date -I).log}"