From f0f66dd1db43b52a156576d7306dbe448369c3f0 Mon Sep 17 00:00:00 2001 From: katherine Date: Thu, 7 Mar 2024 09:00:29 -0700 Subject: add otp dmenu with pass otp --- .config/herbstluftwm/otp.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 .config/herbstluftwm/otp.sh (limited to '.config/herbstluftwm/otp.sh') diff --git a/.config/herbstluftwm/otp.sh b/.config/herbstluftwm/otp.sh new file mode 100755 index 0000000..fc81f13 --- /dev/null +++ b/.config/herbstluftwm/otp.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env zsh + +source ~/.config/init/vars + +local password_files + +password_files=( ~/.password-store/**/otp-*.gpg ) +password_files=( ${password_files:t:r:s/otp-//} ) + +printf "%s\n" $password_files | dmenu -fn "${bfont}:size=${bfont_size}" -i \ + -h "$bheight" -nb "$bar_bg" -nf "$bar_fg" \ + -sb "$bg_focus" -sf "$fg_focus" \ + -p "OTP:" | cut -d ')' -f 1 | read choice + +[[ -n $choice ]] || exit + +pass otp code -c otp-$choice -- cgit v1.2.3