From 1b569cdbfca6e7cb27c2b2e50062ae69778f69b7 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 9 Jun 2021 16:13:45 +0300 Subject: Updated i3lock script to be able to suspend the system --- .i3lock/lock.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to '.i3lock/lock.sh') diff --git a/.i3lock/lock.sh b/.i3lock/lock.sh index 62e3925..7131e1e 100755 --- a/.i3lock/lock.sh +++ b/.i3lock/lock.sh @@ -6,6 +6,16 @@ if [ $(grep -r "RUNNING" /proc/asound | wc -l) -eq 0 ] || [[ $# -ne 0 ]]; then # 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 -- cgit v1.2.3