simplify show menu
This commit is contained in:
parent
401874850d
commit
ecc2af0c71
12
rofi-pass
12
rofi-pass
@ -337,15 +337,16 @@ actionMenu () {
|
|||||||
|
|
||||||
showEntry () {
|
showEntry () {
|
||||||
HELP="<span color='${help_color}'>${copy_entry}: Copy Entry</span>"
|
HELP="<span color='${help_color}'>${copy_entry}: Copy Entry</span>"
|
||||||
bla=$(echo -e "${pass_content}" | _rofi -kb-accept-entry '!Return' -dmenu -mesg "${HELP}" -p "> ")
|
bla=$(echo -e "< Return\n${pass_content}" | _rofi -kb-accept-entry '!Return' -dmenu -mesg "Enter: Copy entry to clipboard" -p "> ")
|
||||||
rofi_exit=$?
|
rofi_exit=$?
|
||||||
|
|
||||||
word=$(echo "$bla" | gawk -F': ' '{print $1}')
|
word=$(echo "$bla" | gawk -F': ' '{print $1}')
|
||||||
if [[ ${rofi_exit} -eq 0 ]]; then
|
if [[ ${rofi_exit} -eq 1 ]]; then
|
||||||
mainMenu
|
|
||||||
elif [[ ${rofi_exit} -eq 1 ]]; then
|
|
||||||
exit
|
exit
|
||||||
elif [[ ${rofi_exit} -eq 11 ]]; then
|
elif [[ ${rofi_exit} -eq 0 ]]; then
|
||||||
|
if [[ ${bla} == "< Return" ]]; then
|
||||||
|
mainMenu
|
||||||
|
else
|
||||||
if [[ -z $(echo -n "${stuff[${word}]}") ]]; then
|
if [[ -z $(echo -n "${stuff[${word}]}") ]]; then
|
||||||
echo -n "$word" | doClip
|
echo -n "$word" | doClip
|
||||||
else
|
else
|
||||||
@ -355,6 +356,7 @@ showEntry () {
|
|||||||
$(sleep 45; echo -n "" | xclip; echo "" | xclip -selection clipboard | notify-send "rofi-pass" "Clipboard cleared") &
|
$(sleep 45; echo -n "" | xclip; echo "" | xclip -selection clipboard | notify-send "rofi-pass" "Clipboard cleared") &
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
exit
|
exit
|
||||||
unset stuff
|
unset stuff
|
||||||
unset password
|
unset password
|
||||||
|
Loading…
Reference in New Issue
Block a user