Merged X11 and wayland version of rofi-pass-simple.sh
This commit is contained in:
parent
14d6b46843
commit
ed13e8cf9f
|
@ -1,14 +0,0 @@
|
|||
#!/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
|
||||
#nohup pass show -c "$@" >/dev/null &
|
||||
nohup sh -c "pass show \"$@\" | head -n 1 | wl-copy --trim-newline" >/dev/null &
|
||||
fi
|
|
@ -9,5 +9,11 @@ fi
|
|||
if [ -z $@ ]; then
|
||||
find -name \*.gpg | sed 's/\.\/\(.*\)\.gpg/\1/'
|
||||
else
|
||||
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
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue