aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2017-07-06 17:29:41 +0200
committerRasmus Steinke <rasi@xssn.at>2017-07-06 17:29:41 +0200
commit0669933453af2a9a53737e0a15ec1aa0dc714fb2 (patch)
tree6ca6670fd5aad0fdc21c9fa8f5c416d5591f1ffa
parent161ee3fb532b792d35469fc64e8aefb1244cfe7b (diff)
downloadrofi-pass-0669933453af2a9a53737e0a15ec1aa0dc714fb2.tar.gz
check for notify variable. fixes #76
-rwxr-xr-xrofi-pass18
1 files changed, 15 insertions, 3 deletions
diff --git a/rofi-pass b/rofi-pass
index 840e3ba..233d766 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -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