Adding passwmenu for a pass menu on wayland.

This commit is contained in:
Derek Taylor
2024-11-07 16:44:14 -06:00
parent c914d1e9aa
commit 640026258a
2 changed files with 39 additions and 1 deletions

View File

@@ -212,17 +212,30 @@ bind = $mainMod, V, togglefloating,
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, T, togglesplit, # dwindle
# Move focus with mainMod + arrow keys
# Move focus with SUPER + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, down, movefocus, d
bind = $mainMod, up, movefocus, u
bind = $mainMod, right, movefocus, r
# Move focus with SUPER + h/j/k/l
bind = $mainMod, H, movefocus, l
bind = $mainMod, J, movefocus, d
bind = $mainMod, K, movefocus, u
bind = $mainMod, L, movefocus, r
# Move window around the stack with SUPER + SHIFT + arrow keys
bind = $mainMod SHIFT, left, movewindow, l
bind = $mainMod SHIFT, down, movewindow, d
bind = $mainMod SHIFT, up, movewindow, u
bind = $mainMod SHIFT, right, movewindow, r
# Move window around the stack with SUPER + SHIFT + h/j/k/l
bind = $mainMod SHIFT, H, movewindow, l
bind = $mainMod SHIFT, J, movewindow, d
bind = $mainMod SHIFT, K, movewindow, u
bind = $mainMod SHIFT, L, movewindow, r
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2

25
.config/hypr/passwmenu Executable file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/env bash
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[@]}" | wofi --dmenu "$@")
[[ -n $password ]] || exit
if [[ $typeit -eq 0 ]]; then
gopass show -c "$password" 2>/dev/null
else
pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } |
ydotool type --clearmodifiers --file -
fi