bugfix: HDMI monitor not enabled using wlopm on sway

This commit is contained in:
cho
2024-01-31 19:06:43 +07:00
parent 914a103b10
commit cd7428e975
2 changed files with 15 additions and 4 deletions

View File

@ -1,8 +1,15 @@
#!/bin/zsh
if [[ -z "$1" ]]; then
if [[ -z "$1" ]] && [[ "$WINDOW_MANAGER" == "river" ]] ; then
swayidle -w \
timeout 310 'swaylock' \
timeout 360 "wlopm --off '*'" resume "wlopm --on '*'" \
timeout 300 'wlopm --off "*"' resume 'wlopm --on "*"' \
before-sleep "swaylock"
fi
if [[ -z "$1" ]] && [[ "$WINDOW_MANAGER" == "sway" ]] ; then
swayidle -w \
timeout 310 'swaylock' \
timeout 300 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
before-sleep "swaylock"
fi