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
9 9
 fi
10 10
 
11 11
 prefix=${PASSWORD_STORE_DIR-~/.password-store}
12
+name=${TITLE-pass}
12 13
 password_files=( "$prefix"/**/*.gpg )
13 14
 password_files=( "${password_files[@]#"$prefix"/}" )
14 15
 password_files=( "${password_files[@]%.gpg}" )
15 16
 
16
-password=$(printf '%s\n' "${password_files[@]}" | dmenu -p pass "$@")
17
+password=$(printf '%s\n' "${password_files[@]}" | dmenu -p ${name} "$@")
17 18
 
18 19
 [[ -n $password ]] || exit
19 20
 

+ 10
- 0
tvim View File

@@ -0,0 +1,10 @@
1
+#!/usr/bin/env bash
2
+term=default-terminal-emulator
3
+vim=vim
4
+#if [[ -x $(type -P nvim) ]]; then
5
+#    vim=nvim
6
+#else
7
+#    vim=vim
8
+#fi
9
+
10
+exec default-terminal-emulator -e $vim $@

Loading…
Cancel
Save