aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzv0n <tom.zvon@gmail.com>2018-06-13 12:07:46 +0200
committerPavan Jadhaw <pavanjadhaw96@gmail.com>2018-06-13 15:37:45 +0530
commit864d00eec3c617c69ba8a2949f2ab7823afe7179 (patch)
tree0e91876e487b61c1a8cfe19db6de0102df34ec92
parent265fa106fc847beac193a5ceee405d8dec17fe4d (diff)
check if dunst is running
-rwxr-xr-xbetterlockscreen8
1 files changed, 6 insertions, 2 deletions
diff --git a/betterlockscreen b/betterlockscreen
index f1295d8..ca519bf 100755
--- a/betterlockscreen
+++ b/betterlockscreen
@@ -37,7 +37,9 @@ init_filenames() {
init_filenames $res
prelock() {
- pkill -u "$USER" -USR1 dunst
+ if [ ! -z "$(pidof dunst)" ] ; then
+ pkill -u "$USER" -USR1 dunst
+ fi
}
lock() {
@@ -63,7 +65,9 @@ lock() {
}
postlock() {
- pkill -u "$USER" -USR2 dunst
+ if [ ! -z "$(pidof dunst)" ] ; then
+ pkill -u "$USER" -USR2 dunst
+ fi
}
rec_get_random() {