diff --git a/i3/scripts/i3exit b/i3/scripts/i3exit index 500f3a1..4167d7e 100755 --- a/i3/scripts/i3exit +++ b/i3/scripts/i3exit @@ -52,10 +52,11 @@ reset_screen() { lock_and_screen_off() { lock & _pid=$! - dunstctl set-paused true + dunst_paused=$(dunstctl is-paused) + [[ "${dunst_paused}" != "true" ]] && dunstctl set-paused true screen_off wait $_pid - dunstctl set-paused false + [[ "${dunst_paused}" != "true" ]] && dunstctl set-paused false reset_screen }