mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
dmenupassword
This commit is contained in:
parent
7d3b042daf
commit
618b81f777
11
.local/bin/i3cmds/dmenupassword
Normal file
11
.local/bin/i3cmds/dmenupassword
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Gives a dmenu prompt to copy password stored in pass database in the clipboard
|
||||||
|
# (See man pass for more details)
|
||||||
|
|
||||||
|
getpass() { \
|
||||||
|
echo "" | xclip -selection clipboard
|
||||||
|
account="$(find ~/.password-store/ -name "*.gpg" | sed 's/.*\///g;s/.gpg$//'| dmenu -i -p "Choose account")"
|
||||||
|
[ "$account" = "" ] && exit 1
|
||||||
|
pass -c $account 2&>1 /dev/null && notify-send "Password for $account stored in clipboard for 45 s ⌛ " && exit 0
|
||||||
|
}
|
||||||
|
getpass
|
||||||
Loading…
x
Reference in New Issue
Block a user