Fix notification when /tmp/brightness-notification does not exist or is empty
This commit is contained in:
parent
74af6090d1
commit
e01d899666
|
@ -41,10 +41,10 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ -n $NOTIFY_ID ]; then
|
||||
NOTIFY_ID=$(notify-send --category=backlight --urgency=low --hint=int:value:$BRIGHTNESS --icon=${HOME}/.icons/Gruvbox/48x48@2x/status/notification-display-brightness${ICON}.svg -p -t 1000 -r $NOTIFY_ID Backlight ${BRIGHTNESS}%)
|
||||
else
|
||||
if [ -z $NOTIFY_ID ]; then
|
||||
NOTIFY_ID=$(notify-send --category=backlight --urgency=low --hint=int:value:$BRIGHTNESS --icon=${HOME}/.icons/Gruvbox/48x48@2x/devices/notification-display-brightness${ICON}.svg -p -t 1000 Backlight ${BRIGHTNESS}%)
|
||||
else
|
||||
NOTIFY_ID=$(notify-send --category=backlight --urgency=low --hint=int:value:$BRIGHTNESS --icon=${HOME}/.icons/Gruvbox/48x48@2x/status/notification-display-brightness${ICON}.svg -p -t 1000 -r $NOTIFY_ID Backlight ${BRIGHTNESS}%)
|
||||
fi
|
||||
|
||||
echo $NOTIFY_ID > /tmp/brightness-notification
|
||||
|
|
Loading…
Reference in New Issue