Skip to content

Commit 63f4569

Browse files
committed
passmenu: added feedback sounds
1 parent 18d12bb commit 63f4569

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

media/unlock2.wav

158 KB
Binary file not shown.

scripts/passmenu.sh

+9-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
shopt -s nullglob globstar
66

77
typeit=0
8-
if [ $1 == "--type" ]; then
8+
if [ "$1" == "--type" ]; then
99
typeit=1
1010
shift
1111
fi
@@ -20,8 +20,14 @@ password=$(printf '%s\n' "${password_files[@]}" | bemenu -p "Target" --fn "$BEME
2020
[ -n "$password" ] || exit
2121

2222
if [ $typeit -eq 0 ]; then
23-
pass show -c "$password" 2>/dev/null
23+
if pass show -c "$password" 2>/dev/null; then
24+
mpv --really-quiet "$HOME/dotfiles/media/unlock2.wav" &
25+
else
26+
mpv --really-quiet "$HOME/dotfiles/media/boing.wav" &
27+
fi
2428
else
25-
pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | ydotool type --file -
29+
if pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | ydotool type --file -; then
30+
mpv --really-quiet "$HOME/dotfiles/media/unlock2.wav" &
31+
fi
2632
fi
2733

0 commit comments

Comments
 (0)