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 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 common/bin/rofipass-wayland (limited to 'common') 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 -- cgit v1.2.3