~kennylevinsen/wldim

SIGUSR2 and SIGTERM handling
readme: Update swayidle/chayang reference

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~kennylevinsen/wldim
read/write
git@git.sr.ht:~kennylevinsen/wldim

You can also use your local clone with git send-email.

#wldim

An idle monitoring tool that dims the screen and executes commands on idle. Useful both to reduce display panel strain and power drain, and to give visual indication of idle.

If you only need visual indication before a lockscreen is about to run, take a look at swayidle and chayang.

#How to use

Example that:

  • At 90 seconds, dims 25%
  • At 240 seconds, dims 50%
  • At 300 seconds, slowly dims 100%, and when reached runs swaylock and disables outputs
  • When resumed, enables outputs
  • Takes 0.5 seconds to animate undim
wldim \
	dim 90000 1500 0.25 \
	dim 240000 1500 0.5 \
	dim-exec 300000 5000 1.0 "swaylock -f; swaymsg output * dpms off" \
	undim 500 \
	resume-exec "swaymsg output * dpms on"

#Commands

  • dim TIMEOUT_MS RUNTIME_MS TARGET: After TIMEOUT_MS of idle time, run a dim animation that takes RUNTIME_MS until TARGET dim level
  • dim-exec TIMEOUT_MS RUNTIME_MS TARGET CMDLINE: Same as dim, but runs the specified command-line after the dim completes
  • exec TIMEOUT_MS CMDLINE: After TIMEOUT_MS of idle time, run the specified command-line
  • resume-exec CMDLINE: Run specified command-line after idle resume
  • undim RUNTIME_MS: When resumed, take the specified amount of time to undim

#How to build

meson setup build
ninja -C build

#How to discuss

Go to #kennylevinsen @ irc.libera.chat to discuss, or use ~kennylevinsen/public-inbox@lists.sr.ht.