diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2024-01-30 16:25:27 -0500 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2024-01-30 16:25:27 -0500 |
commit | 53f42a52329db9d0b5645442f2ebc378aa9e2d5e (patch) | |
tree | 54a94744ce755eaa1e30f1fb89979edb75783903 | |
parent | b238997b6d9761af695c46fbe02ea73e901ce785 (diff) |
Ueberzug no longer leaks
-rw-r--r-- | .config/sxhkd/sxhkdrc | 2 | ||||
-rwxr-xr-x | .local/bin/lfub | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index f2b8d82..24d2e14 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -153,7 +153,7 @@ super + space dropdowntoggle orgmode nvim +"Neorg index" ## Terminal Calculator super + a - dropdowntoggle calc tmux-r + dropdowntoggle calc tmux-py ## Terminal Shell super + shift + a dropdowntoggle shell tmux-shell diff --git a/.local/bin/lfub b/.local/bin/lfub index 9012f50..43a7ef9 100755 --- a/.local/bin/lfub +++ b/.local/bin/lfub @@ -7,7 +7,7 @@ set -e cleanup() { - exec 3>&- + exec 3>&- rm "$FIFO_UEBERZUG" } @@ -17,8 +17,9 @@ else [ ! -d "$HOME/.cache/lf" ] && mkdir -p "$HOME/.cache/lf" export FIFO_UEBERZUG="$HOME/.cache/lf/ueberzug-$$" mkfifo "$FIFO_UEBERZUG" - ueberzug layer -s <"$FIFO_UEBERZUG" -p json & + ueberzug layer -s -p json <"$FIFO_UEBERZUG" & exec 3>"$FIFO_UEBERZUG" trap cleanup HUP INT QUIT TERM PWR EXIT lf "$@" 3>&- + killall ueberzug >/dev/null 2>&1 fi |