aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/.bin/passmenu10
-rw-r--r--templates/.config/sway/config3
2 files changed, 10 insertions, 3 deletions
diff --git a/templates/.bin/passmenu b/templates/.bin/passmenu
index 8284ff2..b5f431b 100755
--- a/templates/.bin/passmenu
+++ b/templates/.bin/passmenu
@@ -7,8 +7,14 @@ password_files=( "$prefix"/**/*.gpg )
password_files=( "${password_files[@]#"$prefix"/}" )
password_files=( "${password_files[@]%.gpg}" )
-password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@")
+password=$(printf '%s\n' "${password_files[@]}" | dmenu)
[[ -n $password ]] || exit
-pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | wl-copy
+cmd=show
+
+if [ "$1" = "otp" ]; then
+ cmd=otp
+fi
+
+pass "$cmd" "$password" | { IFS= read -r pass; printf %s "$pass"; } | wl-copy
diff --git a/templates/.config/sway/config b/templates/.config/sway/config
index a9275d1..7d78b3f 100644
--- a/templates/.config/sway/config
+++ b/templates/.config/sway/config
@@ -69,7 +69,8 @@ input "1133:16493:Logitech_M705" {
bindsym $mod+Shift+q exec swaylock -c 000000
# Grab a password
- bindsym $mod+Shift+p exec passmenu
+ bindsym $mod+p exec passmenu
+ bindsym $mod+Shift+p exec passmenu otp
#
# Moving around: