dmenu-scripts/dmenu-keepassxc

16 lines
575 B
Plaintext
Raw Permalink Normal View History

2022-12-26 12:16:57 +01:00
#!/bin/sh
# Simple dmenu script to ask for keepassxc database password, and get the password of asked account
2023-01-03 17:10:21 +01:00
. ~/.config/dmenu/config
2022-12-26 12:16:57 +01:00
db=$(grep database ~/.config/dmenu-keepassxc/config | cut -d: -f 2)
kf=$(grep keyfile ~/.config/dmenu-keepassxc/config | cut -d: -f 2)
2023-01-03 17:10:21 +01:00
if [ "$2" = copy ]; then
2023-11-04 22:03:43 +01:00
$DMENU -P -p "Enter KeePassXC database password" | keepassxc-cli show -sa password -k $kf $db "$1" | xclip -sel c && quick-notify "Dmenu-KeePassXC" "Password Copied"
2023-01-03 17:10:21 +01:00
else
2023-11-04 22:03:43 +01:00
$DMENU -P -p "Enter KeePassXC database password" | keepassxc-cli show -sa password -k $kf $db "$1"
2023-01-03 17:10:21 +01:00
fi