From 09e1fe3f94f9837f6776f4e77cadce3737ec7048 Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Fri, 9 Jul 2021 11:09:41 +0200 Subject: [PATCH] Added wayland/sway version of the rofi pass wrapper --- scripts/rofi-pass-simple-wlr.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 scripts/rofi-pass-simple-wlr.sh diff --git a/scripts/rofi-pass-simple-wlr.sh b/scripts/rofi-pass-simple-wlr.sh new file mode 100755 index 0000000..dae91cc --- /dev/null +++ b/scripts/rofi-pass-simple-wlr.sh @@ -0,0 +1,14 @@ +#!/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