dmenu-scripts/dmenu-keepassxc

16 lines
525 B
Plaintext
Raw 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
$DMENU -P -p "Enter KeePassXC database password" | keepassxc-cli show -sa password -k $kf $db "$1" | xclip -sel c
else
$DMENU -P -p "Enter KeePassXC database password" | keepassxc-cli show -sa password -k $kf $db "$1"
fi