diff options
author | Rasmus Steinke <rasi@xssn.at> | 2017-07-06 17:29:41 +0200 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2017-07-06 17:29:41 +0200 |
commit | 0669933453af2a9a53737e0a15ec1aa0dc714fb2 (patch) | |
tree | 6ca6670fd5aad0fdc21c9fa8f5c416d5591f1ffa | |
parent | 161ee3fb532b792d35469fc64e8aefb1244cfe7b (diff) | |
download | rofi-pass-0669933453af2a9a53737e0a15ec1aa0dc714fb2.tar.gz |
check for notify variable. fixes #76
-rwxr-xr-x | rofi-pass | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -186,7 +186,10 @@ copyURL () { copyPass () { checkIfPass echo -n "$password" | doClip - notify-send "rofi-pass" "Copied Password\nClearing in 45 seconds" + if [[ $notify == "true" ]] + then + notify-send "rofi-pass" "Copied Password\nClearing in 45 seconds" + fi $(sleep 45; echo -n "" | xclip; echo "" | xclip -selection clipboard | notify-send "rofi-pass" "Clipboard cleared") & } @@ -467,8 +470,17 @@ showEntry () { else echo -n "${stuff[${word}]}" | doClip fi - notify-send "rofi-pass" "Copied Password\nClearing in 45 seconds" - $(sleep 45; echo -n "" | xclip; echo "" | xclip -selection clipboard | notify-send "rofi-pass" "Clipboard cleared") & + if [[ $notify == "true" ]] + then + notify-send "rofi-pass" "Copied Password\nClearing in 45 seconds" + fi + if [[ $notify == "true" ]] + then + $(sleep 45; echo -n "" | xclip; echo "" | xclip -selection clipboard | notify-send "rofi-pass" "Clipboard cleared") & + elif [[ $notify == "false" ]] + then + $(sleep 45; echo -n "" | xclip; echo "" | xclip -selection clipboard) & + fi exit fi fi |