diff options
author | Xiao Pan <xyz@flylightning.xyz> | 2024-08-14 21:50:54 -0700 |
---|---|---|
committer | Xiao Pan <xyz@flylightning.xyz> | 2024-08-14 21:50:54 -0700 |
commit | 0b66a7b7e692e8dd583eb418847c698f47f08fbc (patch) | |
tree | ba4770a8036fdf3883553b8387710d92ca4bd3a6 /sh/pme | |
parent | 0951beb37c88a50307e1e5872f80fb5bba36bd54 (diff) |
my passmenu
Diffstat (limited to 'sh/pme')
-rwxr-xr-x | sh/pme | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -0,0 +1,15 @@ +#!/bin/sh +# my Pass MEnu + +find "$HOME/.password-store/" \( -type f -o -type l \) -name '*.gpg' \ + | sed "s#$HOME/\.password-store/\(.*\)\.gpg\$#\1#" \ + | dmenu -i -p 'pass' \ + | { + case "$1" in + # `{ IFS= read -r p; printf '%s\r' "$p";}` is modified from https://git.zx2c4.com/password-store/tree/contrib/dmenu/passmenu#n34 GPL-2.0-or-later code + '') xargs pass | { IFS= read -r p; printf '%s\r' "$p";};; + '-o') xargs pass otp | tr '\n' '\r';; + *) exit 1;; + esac + } \ + | xdotool type --clearmodifiers --file - |