From 7661621c0005fdc12cfa26c8d9154839b7349e1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Fri, 14 Jan 2022 16:31:19 +0100 Subject: [PATCH] dunst: Update dunstctl for comatibility with upstream script --- bin/dunstctl | 6 +++--- i3/scripts/i3exit | 4 ++-- i3/scripts/presentation-mode | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/dunstctl b/bin/dunstctl index 20de88b..b85bbc9 100755 --- a/bin/dunstctl +++ b/bin/dunstctl @@ -8,13 +8,13 @@ log() { printf '[%s] %s\n' "$(date -uIseconds)" "$*" >> "$_logfile" } -case "$1" in - enable) +case "$1 $2" in + "set-paused false") log "Enabling dunst" systemctl --user --no-block kill --signal SIGUSR2 dunst ;; - disable) + "set-paused true") log "Disabling dunst" systemctl --user --no-block kill --signal SIGUSR1 dunst ;; diff --git a/i3/scripts/i3exit b/i3/scripts/i3exit index 065e28d..500f3a1 100755 --- a/i3/scripts/i3exit +++ b/i3/scripts/i3exit @@ -52,10 +52,10 @@ reset_screen() { lock_and_screen_off() { lock & _pid=$! - dunstctl disable + dunstctl set-paused true screen_off wait $_pid - dunstctl enable + dunstctl set-paused false reset_screen } diff --git a/i3/scripts/presentation-mode b/i3/scripts/presentation-mode index f3cfdfe..8318a1f 100755 --- a/i3/scripts/presentation-mode +++ b/i3/scripts/presentation-mode @@ -9,7 +9,7 @@ is_on() { switch_on() { touch "${_status_file}" - dunstctl disable & + dunstctl set-paused true & systemctl --user --no-block stop redshift.service systemctl --user --no-block stop spotify.service ~/.i3/scripts/bar-update "external_script presentation_mode" @@ -19,7 +19,7 @@ switch_on() { switch_off() { rm -f "${_status_file}" - dunstctl enable & + dunstctl set-paused false & systemctl --user --no-block start redshift.service systemctl --user --no-block start spotify.service ~/.i3/scripts/bar-update "external_script presentation_mode"