From fcf52ccd41d6241f904aa379703d6b5c7b54b351 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Sat, 29 Apr 2023 16:50:14 -0400 Subject: pass settings --- common/bin/rofipass-wayland | 22 ++++++++++++++++++++++ desktop/.config/river/init | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100755 common/bin/rofipass-wayland 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 -- cgit v1.2.3