aboutsummaryrefslogtreecommitdiff
path: root/xmonad/scripts/dmenu-pass.sh
blob: 5721c081123b8d0457c10e62aabf7ff5dc12ab70 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
set -eu

clipctl disable

choice="$(
	find ~/.password-store/ -type f -name '*.gpg'          |
		sed -e "s|^$HOME/.password-store/||" -e 's/\.gpg$//' |
		LANG=POSIX.UTF-8 sort                                |
		dmenu -l 20 -i -p 'Pass: ' -fn Monospace-18
)"

if [ -n "$choice" ]; then
	pass show -c "$choice"
fi

clipctl enable