dunst: Update dunstctl for comatibility with upstream script

This commit is contained in:
2022-01-14 16:31:19 +01:00
parent 0228edc5c7
commit 7661621c00
3 changed files with 7 additions and 7 deletions

View File

@@ -8,13 +8,13 @@ log() {
printf '[%s] %s\n' "$(date -uIseconds)" "$*" >> "$_logfile" printf '[%s] %s\n' "$(date -uIseconds)" "$*" >> "$_logfile"
} }
case "$1" in case "$1 $2" in
enable) "set-paused false")
log "Enabling dunst" log "Enabling dunst"
systemctl --user --no-block kill --signal SIGUSR2 dunst systemctl --user --no-block kill --signal SIGUSR2 dunst
;; ;;
disable) "set-paused true")
log "Disabling dunst" log "Disabling dunst"
systemctl --user --no-block kill --signal SIGUSR1 dunst systemctl --user --no-block kill --signal SIGUSR1 dunst
;; ;;

View File

@@ -52,10 +52,10 @@ reset_screen() {
lock_and_screen_off() { lock_and_screen_off() {
lock & lock &
_pid=$! _pid=$!
dunstctl disable dunstctl set-paused true
screen_off screen_off
wait $_pid wait $_pid
dunstctl enable dunstctl set-paused false
reset_screen reset_screen
} }

View File

@@ -9,7 +9,7 @@ is_on() {
switch_on() { switch_on() {
touch "${_status_file}" touch "${_status_file}"
dunstctl disable & dunstctl set-paused true &
systemctl --user --no-block stop redshift.service systemctl --user --no-block stop redshift.service
systemctl --user --no-block stop spotify.service systemctl --user --no-block stop spotify.service
~/.i3/scripts/bar-update "external_script presentation_mode" ~/.i3/scripts/bar-update "external_script presentation_mode"
@@ -19,7 +19,7 @@ switch_on() {
switch_off() { switch_off() {
rm -f "${_status_file}" rm -f "${_status_file}"
dunstctl enable & dunstctl set-paused false &
systemctl --user --no-block start redshift.service systemctl --user --no-block start redshift.service
systemctl --user --no-block start spotify.service systemctl --user --no-block start spotify.service
~/.i3/scripts/bar-update "external_script presentation_mode" ~/.i3/scripts/bar-update "external_script presentation_mode"