Browse Source

make pass dmenu_pass less hardcoded + provide an alternative for gvim in the form of terminal+vim

master
Von Random 5 years ago
parent
commit
13a6a20970
  1. 3
      dmenu_pass
  2. 10
      tvim

3
dmenu_pass

@ -9,11 +9,12 @@ if [[ $1 == "--type" ]]; then
fi
prefix=${PASSWORD_STORE_DIR-~/.password-store}
name=${TITLE-pass}
password_files=( "$prefix"/**/*.gpg )
password_files=( "${password_files[@]#"$prefix"/}" )
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

10
tvim

@ -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…
Cancel
Save