only osd if notify-send exists
This commit is contained in:
parent
cd11b7c0da
commit
0d10b0d48d
2 changed files with 2 additions and 2 deletions
|
@ -11,5 +11,5 @@ password=$(find ~/.password-store/ -type f -name '*.gpg' | sed 's/.*\/\(.*\)\.gp
|
||||||
pass otp "$password" | while read -r OUTPUT; do
|
pass otp "$password" | while read -r OUTPUT; do
|
||||||
echo $OUTPUT | xsel -ib
|
echo $OUTPUT | xsel -ib
|
||||||
xdotool type "$OUTPUT"
|
xdotool type "$OUTPUT"
|
||||||
notify-send " $password" "$OUTPUT"
|
[ -e /usr/bin/notify-send ] && notify-send " $password" "$OUTPUT"
|
||||||
done
|
done
|
||||||
|
|
|
@ -10,4 +10,4 @@ password=$(find ~/.password-store/ -type f -name '*.gpg' |
|
||||||
|
|
||||||
# If chosen, use xdotool to type it
|
# If chosen, use xdotool to type it
|
||||||
pass=$(pass show "$password" | head -1)
|
pass=$(pass show "$password" | head -1)
|
||||||
xdotool type "$pass" && notify-send " $password" "Successfully decrypted"
|
xdotool type "$pass" && [ -e /usr/bin/notify-send ] && notify-send " $password" "Successfully decrypted"
|
||||||
|
|
Loading…
Reference in a new issue