From 96fb0c224d000740bd1d5a16561b38db566b8a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Sun, 23 Feb 2020 13:59:52 +0100 Subject: [PATCH] Suspend dunst notifications in presentatio mode, lock --- i3/scripts/i3exit | 2 ++ i3/scripts/presentation-mode | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/i3/scripts/i3exit b/i3/scripts/i3exit index 2a26cfe..ccce0b0 100755 --- a/i3/scripts/i3exit +++ b/i3/scripts/i3exit @@ -47,9 +47,11 @@ reset_screen() { lock_and_screen_off() { lock & _pid=$! + systemctl --user --no-block kill --signal SIGUSR1 dunst_user screen_off xset dpms 0 0 5 wait $_pid + systemctl --user --no-block kill --signal SIGUSR2 dunst_user reset_screen } diff --git a/i3/scripts/presentation-mode b/i3/scripts/presentation-mode index 71dc77d..5fe1f83 100755 --- a/i3/scripts/presentation-mode +++ b/i3/scripts/presentation-mode @@ -9,13 +9,15 @@ is_on() { switch_on() { 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 spotify } switch_off() { rm -f "${_status_file}" - "$_autostart" dunst_user redshift + systemctl --user --no-block kill --signal SIGUSR2 dunst_user + "$_autostart" redshift spotify }