Browse Source

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

master
Von Random 2 years ago
parent
commit
13a6a20970
2 changed files with 12 additions and 1 deletions
  1. 2
    1
      dmenu_pass
  2. 10
    0
      tvim

+ 2
- 1
dmenu_pass View File

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