add notifications to screensaver toggle
This commit is contained in:
parent
e3258ce67d
commit
b4c3c76cbf
3 changed files with 16 additions and 2 deletions
|
@ -203,7 +203,7 @@ bindsym $mod+r mode "resize"
|
|||
# screen lock
|
||||
bindsym $mod+Mod1+l exec "$lock -f"
|
||||
bindsym Scroll_Lock exec "$lock -f"
|
||||
bindsym $mod+Scroll_Lock exec pkill swayidle
|
||||
bindsym $mod+Scroll_Lock exec /home/thrrgilag/bin/noidle
|
||||
bindsym $mod+Mod1+Scroll_Lock exec /home/thrrgilag/bin/idle
|
||||
|
||||
# screenshots
|
||||
|
|
9
bin/idle
9
bin/idle
|
@ -9,4 +9,11 @@ swayidle -w \
|
|||
timeout ${SLEEP_TMOUT} 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
before-sleep "swaylock -f -i ${BACKGROUND}" &
|
||||
|
||||
pgrep swayidle
|
||||
RT=$?
|
||||
if [ $RT -eq 0 ]
|
||||
then
|
||||
notify-send -t 1000 idle "Screensaver enabled"
|
||||
else
|
||||
notify-send idle "Unable to enable screensaver"
|
||||
fi
|
||||
|
|
|
@ -1,2 +1,9 @@
|
|||
#!/bin/bash
|
||||
pkill swayidle
|
||||
RT=$?
|
||||
if [ $RT -eq 0 ]
|
||||
then
|
||||
notify-send -t 1000 noidle "Screensaver disabled"
|
||||
else
|
||||
notify-send noidle "Unable to disable screensaver"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue