2 releases
Uses new Rust 2024
new 0.1.1 | Apr 14, 2025 |
---|---|
0.1.0 | Apr 14, 2025 |
#1215 in Command line utilities
10KB
81 lines
wlr-screen-fade
Fade the screen to black using wlr layer shell.
I wanted a simple program that slowly fades the screen to black before turning the display off using a tool such as wlopm.
Usage
Run wlr-screen-fade
and the screen while fade to black within 10,000 ms.
You can pass a different time (in milliseconds) with the -t
flag.
The program will exit with 0
once it reached the time and the screen turned completely black.
This allows you to chain additional programs to execute.
For example I use it with swayidle and wlopm so the screen doesn't turn off abruptly when the system is idle and instead allows the user to react (by doing any input) once the fade animation starts:
swayidle -w timeout 300 "wlr-screen-fade -t 10000 && wlopm --off '*'" resume "wlopm --on '*'"
Dependencies
- gtk4
- gtk4-layer-shell
Dependencies
~17–25MB
~477K SLoC