#!/bin/bash if [ $(grep -r "RUNNING" /proc/asound | wc -l) -eq 0 ] || [[ $# -ne 0 ]]; then # Also disables and enables dunst, my notification daemon # https://github.com/dunst-project/dunst/issues/697 # https://wiki.archlinux.org/title/Dunst#Disable_dunst_temporarily killall -SIGUSR1 dunst if [[ "$1" == "suspend" ]]; then systemctl -i suspend # Audio could get messed up if something is playing while trying to suspend # By restarting pulseaudio, all playback gets "stopped", which should prevent any audio issues post-suspend pulseaudio -k fi i3lock -f -c d49408 -i /home/kamen/.i3lock/lockscreen.png -n killall -SIGUSR2 dunst killall lwa-hot-corners; lwa-hot-corners ~/.lwarc & killall tint2; tint2 & fi