diff options
-rwxr-xr-x | common/bin/rofipass-wayland | 22 | ||||
-rwxr-xr-x | desktop/.config/river/init | 2 |
2 files changed, 23 insertions, 1 deletions
diff --git a/common/bin/rofipass-wayland b/common/bin/rofipass-wayland new file mode 100755 index 0000000..2dbbd10 --- /dev/null +++ b/common/bin/rofipass-wayland @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -x +shopt -s nullglob globstar + +typeit=0 +if [[ $1 == "--type" ]]; then + typeit=1 + shift +fi + +prefix=${PASSWORD_STORE_DIR-~/.password-store} +password_files=( "$prefix"/**/*.gpg ) +password_files=( "${password_files[@]#"$prefix"/}" ) +password_files=( "${password_files[@]%.gpg}" ) + +password=$(printf '%s\n' "${password_files[@]}" | rofi -dmenu "$@") + +[[ -n $password ]] || exit + +if [[ $typeit -eq 0 ]]; then + wl-copy "$(pass show "$password" | head -1)" & sleep 45s && wl-copy -c +fi diff --git a/desktop/.config/river/init b/desktop/.config/river/init index ccca288..7e5f859 100755 --- a/desktop/.config/river/init +++ b/desktop/.config/river/init @@ -16,7 +16,7 @@ riverctl spawn firefox riverctl map normal Super+Shift Return spawn foot riverctl map normal Super T spawn "emacsclient -c" riverctl map normal Super D spawn "rofi -show run" -riverctl map normal Super S spawn "rofipass" +riverctl map normal Super S spawn "rofipass-wayland" # Super+Q to close the focused view riverctl map normal Super+Shift C close |