aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortwells46 <173561638+twells46@users.noreply.github.com>2026-01-01 06:37:41 -0600
committertwells46 <173561638+twells46@users.noreply.github.com>2026-01-01 06:37:41 -0600
commit7900b7943562939225c56d042375e44f3094d013 (patch)
tree8509c4d675b8157c38b1bd6083b51b7e346bb30e
parente0db34ff74766f0f306b55782a2163f7f387e747 (diff)
Initial templating for passmenu
-rw-r--r--private_dot_local/bin/executable_gopassmenu15
-rw-r--r--private_dot_local/bin/executable_gopassmenu.tmpl22
-rw-r--r--private_dot_local/bin/executable_gousermenu11
-rw-r--r--private_dot_local/bin/executable_gousermenu.tmpl22
4 files changed, 44 insertions, 26 deletions
diff --git a/private_dot_local/bin/executable_gopassmenu b/private_dot_local/bin/executable_gopassmenu
deleted file mode 100644
index f557307..0000000
--- a/private_dot_local/bin/executable_gopassmenu
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-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
-
-#gopass ls --flat | wofi -dab -k /dev/null -p "Password: " | xargs -r gopass show -o | wl-copy
-
-# X11
-#gopass ls --flat | dmenu -p 'Password' | xargs -r gopass show -o | xdotool type --clearmodifiers --file -
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 }}
diff --git a/private_dot_local/bin/executable_gousermenu b/private_dot_local/bin/executable_gousermenu
deleted file mode 100644
index cffac84..0000000
--- a/private_dot_local/bin/executable_gousermenu
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-uname="$(gopass ls --flat | wmenu -l 10 -p 'Username: ' -f 'Liberation Mono 12px' | xargs -r gopass show | sed -n '2p')"
-# [t]ype or copy
-if [ "$1" = "-t" ] ; then
- wtype "${uname}"
-else
- wl-copy "${uname}"
- ( sleep 30 && wl-copy -c ) &
-fi
-#wl-copy "${uname##*/}"
diff --git a/private_dot_local/bin/executable_gousermenu.tmpl b/private_dot_local/bin/executable_gousermenu.tmpl
new file mode 100644
index 0000000..83109a8
--- /dev/null
+++ b/private_dot_local/bin/executable_gousermenu.tmpl
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+{{- if eq .chezmoi.hostname "Aragorn" }}
+# Home laptop
+uname="$(gopass ls --flat | dmenu -l 10 -p 'Username: ' | xargs -r gopass show | sed -n '2p')"
+# [t]ype or copy
+if [ "$1" = "-t" ] ; then
+ xdotool type --clearmodifiers "${uname}"
+else
+ wl-copy -o "${uname}"
+ ( sleep 30 && wl-copy -c ) &
+fi
+{{- else }}
+uname="$(gopass ls --flat | wmenu -l 10 -p 'Username: ' -f 'Liberation Mono 12px' | xargs -r gopass show | sed -n '2p')"
+# [t]ype or copy
+if [ "$1" = "-t" ] ; then
+ wtype "${uname}"
+else
+ wl-copy -o "${uname}"
+ ( sleep 30 && wl-copy -c ) &
+fi
+{{- end }}