sway: use output power instead of deprecated dpms
BREAKING: this change requires Sway >= 1.8. Fixes: #3
This commit is contained in:
parent
d2212f6672
commit
a3ccaebd56
4 changed files with 10 additions and 10 deletions
|
|
@ -10,8 +10,8 @@ bindsym Mod4+shift+e exec swaynag \
|
|||
|
||||
# Disable displays on idle
|
||||
exec command -v swayidle >/dev/null && swayidle -w \
|
||||
timeout 300 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"'
|
||||
timeout 300 'swaymsg "output * power off"' \
|
||||
resume 'swaymsg "output * power on"'
|
||||
|
||||
# Apply system keyboard configuration
|
||||
exec /usr/libexec/sway-systemd/locale1-xkb-config
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# vim: ft=spec
|
||||
%bcond_without sddm
|
||||
%global sway_ver 1.7
|
||||
%global sway_ver 1.8
|
||||
|
||||
Name: {{{ git_name }}}
|
||||
Version: {{{ git_version }}}
|
||||
|
|
@ -60,7 +60,7 @@ Conflicts: sddm-greeter-displayserver
|
|||
|
||||
Requires: lxqt-themes-fedora
|
||||
Requires: sddm >= 0.19.0^git20221123.3e48649
|
||||
Requires: sway
|
||||
Requires: sway >= %{sway_ver}
|
||||
|
||||
%description -n sddm-wayland-sway
|
||||
This package contains configuration and dependencies for SDDM
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@
|
|||
exec LT="$lock_timeout" ST="$screen_timeout" LT=${LT:-300} ST=${ST:-60} && \
|
||||
swayidle -w \
|
||||
timeout $LT 'swaylock -f' \
|
||||
timeout $((LT + ST)) 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
timeout $ST 'pgrep -xu "$USER" swaylock >/dev/null && swaymsg "output * dpms off"' \
|
||||
resume 'pgrep -xu "$USER" swaylock >/dev/null && swaymsg "output * dpms on"' \
|
||||
timeout $((LT + ST)) 'swaymsg "output * power off"' \
|
||||
resume 'swaymsg "output * power on"' \
|
||||
timeout $ST 'pgrep -xu "$USER" swaylock >/dev/null && swaymsg "output * power off"' \
|
||||
resume 'pgrep -xu "$USER" swaylock >/dev/null && swaymsg "output * power on"' \
|
||||
before-sleep 'swaylock -f' \
|
||||
lock 'swaylock -f' \
|
||||
unlock 'pkill -xu "$USER" -SIGUSR1 swaylock'
|
||||
|
|
|
|||
|
|
@ -11,5 +11,5 @@
|
|||
|
||||
exec LT="$lock_timeout" ST="$screen_timeout" LT=${LT:-300} ST=${ST:-60} && \
|
||||
swayidle -w \
|
||||
timeout $((LT + ST)) 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
timeout $((LT + ST)) 'swaymsg "output * power off"' \
|
||||
resume 'swaymsg "output * power on"' \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue