Suspend dunst notifications in presentatio mode, lock
This commit is contained in:
@@ -47,9 +47,11 @@ reset_screen() {
|
|||||||
lock_and_screen_off() {
|
lock_and_screen_off() {
|
||||||
lock &
|
lock &
|
||||||
_pid=$!
|
_pid=$!
|
||||||
|
systemctl --user --no-block kill --signal SIGUSR1 dunst_user
|
||||||
screen_off
|
screen_off
|
||||||
xset dpms 0 0 5
|
xset dpms 0 0 5
|
||||||
wait $_pid
|
wait $_pid
|
||||||
|
systemctl --user --no-block kill --signal SIGUSR2 dunst_user
|
||||||
reset_screen
|
reset_screen
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,13 +9,15 @@ is_on() {
|
|||||||
|
|
||||||
switch_on() {
|
switch_on() {
|
||||||
touch "${_status_file}"
|
touch "${_status_file}"
|
||||||
systemctl --user --no-block stop dunst_user
|
systemctl --user --no-block kill --signal SIGUSR1 dunst_user
|
||||||
systemctl --user --no-block stop redshift
|
systemctl --user --no-block stop redshift
|
||||||
|
systemctl --user --no-block stop spotify
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_off() {
|
switch_off() {
|
||||||
rm -f "${_status_file}"
|
rm -f "${_status_file}"
|
||||||
"$_autostart" dunst_user redshift
|
systemctl --user --no-block kill --signal SIGUSR2 dunst_user
|
||||||
|
"$_autostart" redshift spotify
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user