diff options
| author | twells46 <173561638+twells46@users.noreply.github.com> | 2026-01-01 06:37:41 -0600 |
|---|---|---|
| committer | twells46 <173561638+twells46@users.noreply.github.com> | 2026-01-01 06:37:41 -0600 |
| commit | 7900b7943562939225c56d042375e44f3094d013 (patch) | |
| tree | 8509c4d675b8157c38b1bd6083b51b7e346bb30e /private_dot_local/bin/executable_gopassmenu.tmpl | |
| parent | e0db34ff74766f0f306b55782a2163f7f387e747 (diff) | |
Initial templating for passmenu
Diffstat (limited to 'private_dot_local/bin/executable_gopassmenu.tmpl')
| -rw-r--r-- | private_dot_local/bin/executable_gopassmenu.tmpl | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/private_dot_local/bin/executable_gopassmenu.tmpl b/private_dot_local/bin/executable_gopassmenu.tmpl new file mode 100644 index 0000000..134f1ed --- /dev/null +++ b/private_dot_local/bin/executable_gopassmenu.tmpl @@ -0,0 +1,22 @@ +#!/bin/sh + +{{- if eq .chezmoi.hostname "Aragorn" }} +# Home laptop +PW="$(gopass ls --flat | dmenu -l 10 -p 'Password: ' | xargs -r gopass show | head -n1)" +# [t]ype or copy +if [ "$1" = "-t" ] ; then + xdotool type --clearmodifiers "${PW}" +else + wl-copy -o "${PW}" + ( sleep 30 && wl-copy -c ) & +fi +{{- else }} +PW="$(gopass ls --flat | wmenu -l 10 -p 'Password: ' -f 'Liberation Mono 12px' | xargs -r gopass show | head -n1)" +# [t]ype or copy +if [ "$1" = "-t" ] ; then + wtype "${PW}" +else + wl-copy -o "${PW}" + ( sleep 30 && wl-copy -c ) & +fi +{{- end }} |