aboutsummaryrefslogtreecommitdiffhomepage
path: root/X11/rofi/pass.get
diff options
context:
space:
mode:
Diffstat (limited to 'X11/rofi/pass.get')
-rwxr-xr-xX11/rofi/pass.get9
1 files changed, 4 insertions, 5 deletions
diff --git a/X11/rofi/pass.get b/X11/rofi/pass.get
index df70652..44857db 100755
--- a/X11/rofi/pass.get
+++ b/X11/rofi/pass.get
@@ -1,6 +1,5 @@
1#! /bin/sh 1#! /bin/sh
2 2
3ROFI_ARGS=( '-font' 'Hack 22' )
4OPTIONS_NEW=( 'NO' 'YES' 'YES, and edit it' ) 3OPTIONS_NEW=( 'NO' 'YES' 'YES, and edit it' )
5 4
6# Generate a new password 5# Generate a new password
@@ -9,14 +8,14 @@ if [ -n "${ROFI_DATA}" ]; then
9 coproc ( 8 coproc (
10 export POST=false 9 export POST=false
11 pass generate ${ROFI_DATA} --clip 10 pass generate ${ROFI_DATA} --clip
12 rofi "${ROFI_ARGS[@]}" -e "Generate and Copied: ${ROFI_DATA}" 11 rofi -e "Generate and Copied: ${ROFI_DATA}"
13 ) 12 )
14 13
15 [ "$1" == "${OPTIONS_NEW[2]}" ] && \ 14 [ "$1" == "${OPTIONS_NEW[2]}" ] && \
16 coproc ( 15 coproc (
17 export POST=false 16 export POST=false
18 pass generate ${ROFI_DATA} --clip 17 pass generate ${ROFI_DATA} --clip
19 alacritty -e pass edit ${ROFI_DATA}; \ 18 rofi-sensible-terminal -e pass edit ${ROFI_DATA}; \
20 ) 19 )
21 20
22 exit 0 21 exit 0
@@ -40,8 +39,8 @@ if [ -n "$RESULT" ]; then
40 echo "$RESULT" | head -1 | xsel -ib 39 echo "$RESULT" | head -1 | xsel -ib
41 40
42 # And show extra message 41 # And show extra message
43 EXTRA="$(echo; echo; echo "$RESULT" | sed '1d; 1{/^$/d}')" 42 EXTRA="$(echo; echo; echo "$RESULT" | sed '1d' | sed '1{/^$/d}')"
44 coproc ( rofi "${ROFI_ARGS[@]}" -e "Copied: $1$EXTRA" ) 43 coproc ( rofi -e "Copied: $1$EXTRA" )
45# Password doesn't exist yet 44# Password doesn't exist yet
46# Go to next rofi execution 45# Go to next rofi execution
47else 46else