Switch from way-displays to kanshi

This commit is contained in:
2025-08-21 04:46:15 -07:00
parent 2ee4b47086
commit 59e6c14c1b
2 changed files with 15 additions and 6 deletions

View File

@ -22,7 +22,7 @@ function run {
swaylock ${empty_flag} --color '#000000'
else
# get the list of currently disabled monitors so we don't touch them
local ignored=("${(0)$(way-displays-enable -l)}")
local ignored=("${(0)$(enable-displays-for-sleep -l)}")
local ignored_args=()
for name in ${ignored}; do
# quote so it can be safely passed to swayidle
@ -30,8 +30,8 @@ function run {
done
swayidle -w -C /dev/null \
timeout 15 "way-displays-enable -d ${ignored}" \
resume "way-displays-enable {$ignored}" &
timeout 15 "enable-displays-for-sleep -d ${ignored}" \
resume "enable-displays-for-sleep {$ignored}" &
local swayidle_pid="${!}"
swaylock ${empty_flag} ${img_flags}
kill "${swayidle_pid}"