2017-10-17 21:52:20 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ ! -z "$PASSWORD_STORE_DIR" ]; then
|
|
|
|
cd "$PASSWORD_STORE_DIR"
|
|
|
|
else
|
|
|
|
cd "$HOME/.password-store"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z $@ ]; then
|
|
|
|
find -name \*.gpg | sed 's/\.\/\(.*\)\.gpg/\1/'
|
|
|
|
else
|
2021-07-16 21:59:56 +02:00
|
|
|
if [ -z "$WAYLAND_DISPLAY" ]; then
|
|
|
|
# X11 version
|
|
|
|
nohup pass show -c "$@" >/dev/null &
|
|
|
|
else
|
|
|
|
# Wlroots (sway) version
|
|
|
|
nohup sh -c "pass show \"$@\" | head -n 1 | wl-copy --trim-newline" >/dev/null &
|
|
|
|
fi
|
2017-10-17 21:52:20 +02:00
|
|
|
fi
|