add otp and student snippets

This commit is contained in:
Felix Van der Jeugt 2021-03-16 10:50:03 +01:00
parent b5ad069f77
commit 5f9da8b532
No known key found for this signature in database
GPG Key ID: 58B209295023754D
1 changed files with 11 additions and 1 deletions

View File

@ -26,6 +26,8 @@ password
clipboard clipboard
selection selection
run run
otp
student
HERE HERE
)" )"
@ -36,7 +38,7 @@ case "$choice" in
;; ;;
'password') 'password')
choice="$(cd ~/.password-store; find * -name '*.gpg' | sed 's/\.gpg$//' | sort -d | pick)" choice="$(cd ~/.password-store; find * -name '*.gpg' | sed 's/\.gpg$//' | sort -d | pick)"
inject "$(pass show $choice | head -1)" inject "$(pass show "$choice" | head -1)"
;; ;;
'clipboard') 'clipboard')
inject "$(xclip -o -sel c)" inject "$(xclip -o -sel c)"
@ -48,4 +50,12 @@ case "$choice" in
choice="$(dmenu_path | pick)" choice="$(dmenu_path | pick)"
exec "$choice" exec "$choice"
;; ;;
'otp')
choice="$(cd ~/.password-store/otp; find * -name '*.gpg' | sed 's/\.gpg$//' | sort -d | pick)"
inject "$(pass otp code otp/"$choice" | head -1)"
;;
'student')
choice="$(pick < /data/courses/students.csv)"
inject "$choice"
;;
esac esac