Wrote this simple tool for switching the screen off and on after a keypress. It's mainly aimed at Hyprland, as in it's current state it will try running
hyprctl dispatch dpms off
(and dpms on respectively).
If you're not using Hyprland, the tool is pointless without changing lines 40 & 54 to your respective dpms dispatchers.
- gcc
- libinput
- libudev
- pkg-config
That's it. libinput comes preinstalled when using Hyprland.
Run:
git clone https://github.com/snoowfall/sss.git
cd ./sss/
gcc sss.c -o sss $(pkg-config --cflags --libs libinput) -ludev
You should now see sss in that folder. Copy it to /bin/ (or similar) to use it directly via the command line.