[dpass] Change from ydotool to dotool; add support for OpenTTD.pro !login command

This commit is contained in:
Midgard 2024-06-27 12:39:18 +02:00
parent d6de6a541e
commit 79d96c08b5
Signed by untrusted user who does not match committer: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -4,7 +4,8 @@ set -euo pipefail
cd ~/.password-store cd ~/.password-store
passname=$(find -name "*.gpg" | sed -r 's|\./(.*)\.gpg$|\1|' | rofi -dmenu -p pass) passname=$(find -name "*.gpg" | sed -r 's|\./(.*)\.gpg$|\1|' | rofi -dmenu -p pass)
case "$passname" in case "$passname" in
openttdpro-otp) password="!login $(pass otp "$passname")"; ;;
*-otp) password="$(pass otp "$passname")"; ;; *-otp) password="$(pass otp "$passname")"; ;;
*) password="$(pass show "$passname" | sed '/^$/q')"; ;; *) password="$(pass show "$passname" | sed '/^$/q')"; ;;
esac esac
ydotool type "$password" printf '%s\n' "type $password" | dotoolc