11 lines
368 B
Bash
Executable file
11 lines
368 B
Bash
Executable file
#!/bin/sh
|
|
set -euo pipefail
|
|
|
|
cd ~/.password-store
|
|
passname=$(find -name "*.gpg" | sed -r 's|\./(.*)\.gpg$|\1|' | rofi -dmenu -p pass)
|
|
case "$passname" in
|
|
openttdpro-otp) password="!login $(pass otp "$passname")"; ;;
|
|
*-otp) password="$(pass otp "$passname")"; ;;
|
|
*) password="$(pass show "$passname" | sed '/^$/q')"; ;;
|
|
esac
|
|
printf '%s\n' "type $password" | dotoolc
|