mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Better random passwords
This commit is contained in:
parent
92336ad746
commit
8f28de8865
@ -52,7 +52,7 @@ addPassword() { \
|
||||
[ -z "$name" ] && exit
|
||||
|
||||
case "$(printf "Random password\\nManual password" | dmenu -i -p "Passwords")" in
|
||||
"Random password") addPass=$(tr -dc '[:print:]' < /dev/urandom | tr -d ' ' | head -c $(printf "12\\n32\\n128" | dmenu -i -p "How many characters?")) ;;
|
||||
"Random password") addPass=$(tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' </dev/urandom | head -c $(printf "12\\n32\\n128" | dmenu -i -p "How many characters?") ; echo) ;;
|
||||
"Manual password") addPass=$(dmenu -i -P -p "Enter a password") ;;
|
||||
* ) exit
|
||||
esac
|
||||
@ -64,15 +64,15 @@ addPassword() { \
|
||||
}
|
||||
|
||||
removePassword() { \
|
||||
name="$(pass | printf '%s\n' "${password_files[@]}" | dmenu -i -p "Passwords")"
|
||||
name="$(pass | echo "$password_files" | dmenu -i -p "Passwords")"
|
||||
|
||||
[ -z "$name" ] && exit
|
||||
|
||||
sure="$(printf "No\\nYes" | dmenu -i -sb "#ac3333" -sf "#111111" -nf "#dddddd" -nb "#111111" -p "Are you sure?")"
|
||||
if [ $sure = "Yes" ]
|
||||
then
|
||||
notify-send "❎ Password for $name removed!"
|
||||
pass rm "$name" -f
|
||||
notify-send "❎ Password for $name removed!"
|
||||
else
|
||||
notify-send "Canceled"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user