attempt to fix ala-fzf

This commit is contained in:
Yorick van Pelt 2024-06-03 21:37:03 +02:00
parent fac6d63eda
commit b302bd659f
Signed by: yorick
GPG key ID: D8D3CC6D951384DE
2 changed files with 5 additions and 2 deletions

View file

@ -1,3 +1,4 @@
set -euo pipefail
alacritty msg create-window --class ala-fzf -e "$HOME/dotfiles/bin/fzf-pass-inner.sh" && exit 0
exec alacritty --class ala-fzf -e "$HOME/dotfiles/bin/fzf-pass-inner.sh"

View file

@ -5,12 +5,14 @@ if [ -z "$ENTRY" ]; then
exit 1
fi
PASSENTRY=$(pass "$ENTRY")
builtin echo "$PASSENTRY" | head -n1 | nohup wl-copy -f -n --sensitive &
(builtin echo "$PASSENTRY" | head -n1 | nohup wl-copy -f -n --sensitive) &
WLCOPY_PID=$!
disown -h
nohup bash -c "sleep 30s; kill $WLCOPY_PID" &
disown -h
NOTIFICATION=$(builtin echo "$PASSENTRY" | sed 1d)
notify-send -t 6000 "$NOTIFICATION"
if [ ! -z "${NOTIFICATION}" ]; then
notify-send -t 6000 "$NOTIFICATION"
fi
builtin echo "$NOTIFICATION"