diff --git a/scripts/rofi-pass-simple-wlr.sh b/scripts/rofi-pass-simple-wlr.sh deleted file mode 100755 index dae91cc..0000000 --- a/scripts/rofi-pass-simple-wlr.sh +++ /dev/null @@ -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 diff --git a/scripts/rofi-pass-simple.sh b/scripts/rofi-pass-simple.sh index 665c5c1..180dcd6 100755 --- a/scripts/rofi-pass-simple.sh +++ b/scripts/rofi-pass-simple.sh @@ -9,5 +9,11 @@ fi if [ -z $@ ]; then find -name \*.gpg | sed 's/\.\/\(.*\)\.gpg/\1/' else - nohup pass show -c "$@" >/dev/null & + 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