Closed jamesawebb closed 5 months ago
It should be possible to script this. Start swaylock in the background, send SIGUSR1 to swaylock after the timeout.
Note, I am not familiar with RSI/OOS.
It should be possible to script this. Start swaylock in the background, send SIGUSR1 to swaylock after the timeout.
Indeed. Covered well at https://github.com/swaywm/sway/issues/7665. I should be able to script this.
Note, I am not familiar with RSI/OOS.
You're lucky. It's not pleasant. https://rsi.org.au/index.php/what-is-rsi-and-oos/
For anyone interested in doing the same (this comes well recommended), I currently have the following crontab
entry:
# OOS break: pause every 12m for 10s
*/12 * * * * [ $(pgrep -c swaylock) = 0 ] && ( XDG_RUNTIME_DIR=/run/user/$(id -u) WAYLAND_DISPLAY=wayland-1 /usr/local/bin/swaylock --font break && sleep 10 && pkill -f -USR1 "swaylock --font break" )
I'm sure improvements can be made, but this suits my needs reasonably well.
Currently there aren't great RSI/OOS tools for sway. Adding support to unlock after a defined period would be an easy way to provide RSI/OOS capabilities.