generate new password if it doesn't exist in menu scripts
arĉi arcxi@dismail.de
Wed, 26 Jun 2024 08:58:08 +0200
5 files changed,
15 insertions(+),
5 deletions(-)
M
contrib/pa-fuzzel
→
contrib/pa-fuzzel
@@ -1,7 +1,9 @@
#!/bin/sh # # prompt for a password via fuzzel +# generate new password if it doesn't exist # then type the selected password via wtype name=$(pa list | fuzzel -dmenu "$@") -pa show "$name" | head -n 1 | tr -d '\n' | wtype - +{ pa show "$name" || { printf y | pa add "$name" >/dev/null && pa show "$name"; }; } | + head -n 1 | tr -d '\n' | wtype -
M
contrib/pa-rofi
→
contrib/pa-rofi
@@ -1,7 +1,9 @@
#!/bin/sh # # prompt for a password via rofi +# generate new password if it doesn't exist # then type the selected password via xdotool name=$(pa list | rofi -dmenu -i "$@") -pa show "$name" | head -n 1 | tr -d '\n' | xdotool type --clearmodifiers --file - +{ pa show "$name" || { printf y | pa add "$name" >/dev/null && pa show "$name"; }; } | + head -n 1 | tr -d '\n' | xdotool type --clearmodifiers --file -