make pass dmenu_pass less hardcoded + provide an alternative for gvim in the form of terminal+vim
This commit is contained in:
parent
cf2627c699
commit
13a6a20970
2 changed files with 12 additions and 1 deletions
|
@ -9,11 +9,12 @@ if [[ $1 == "--type" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
prefix=${PASSWORD_STORE_DIR-~/.password-store}
|
prefix=${PASSWORD_STORE_DIR-~/.password-store}
|
||||||
|
name=${TITLE-pass}
|
||||||
password_files=( "$prefix"/**/*.gpg )
|
password_files=( "$prefix"/**/*.gpg )
|
||||||
password_files=( "${password_files[@]#"$prefix"/}" )
|
password_files=( "${password_files[@]#"$prefix"/}" )
|
||||||
password_files=( "${password_files[@]%.gpg}" )
|
password_files=( "${password_files[@]%.gpg}" )
|
||||||
|
|
||||||
password=$(printf '%s\n' "${password_files[@]}" | dmenu -p pass "$@")
|
password=$(printf '%s\n' "${password_files[@]}" | dmenu -p ${name} "$@")
|
||||||
|
|
||||||
[[ -n $password ]] || exit
|
[[ -n $password ]] || exit
|
||||||
|
|
||||||
|
|
10
tvim
Executable file
10
tvim
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
term=default-terminal-emulator
|
||||||
|
vim=vim
|
||||||
|
#if [[ -x $(type -P nvim) ]]; then
|
||||||
|
# vim=nvim
|
||||||
|
#else
|
||||||
|
# vim=vim
|
||||||
|
#fi
|
||||||
|
|
||||||
|
exec default-terminal-emulator -e $vim $@
|
Loading…
Reference in a new issue