2022-11-23 20:18:02 +00:00
|
|
|
#!/usr/bin/env bash
|
2023-01-19 21:55:23 +00:00
|
|
|
if ! ps aux | grep -v grep | grep swaylock; then
|
2023-06-04 04:06:31 +00:00
|
|
|
# if [[ $(playerctl status) != "Playing" ]]; then
|
2023-12-13 03:47:45 +00:00
|
|
|
# swayidle -w timeout 600 'loginctl suspend' &
|
2023-06-04 04:06:31 +00:00
|
|
|
# SUSPEND=$!
|
|
|
|
# fi
|
|
|
|
swayidle -w timeout 15 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' &
|
|
|
|
SCREENOFF=$!
|
|
|
|
swaylock
|
|
|
|
kill $SUSPEND $SCREENOFF
|
|
|
|
fi
|