Full-black, per-monitor overlay windows for OLED burn-in prevention.
I have a three multi monitor setup, and sometimes I play on one, or just watch a movie, and the other ones are just sitting there burning in their pixels. So I made a small app that renders a full screen, black overlay, over the monitor you want to turn off and I can do this from a shortcut key for each monitor individually. In case anywone needs it, here's the code.
- X11 session (not Wayland)
xrandravailable inPATH
go build -o oled .List monitors and their indices:
./oled listToggle blackout on monitor 0 (or by output name like DP-1):
./oled toggle 0
./oled toggle DP-1Black out two monitors (e.g. left + right):
./oled on 0 2Emergency un-blackout:
./oled off all- Open System Settings → Keyboard → Shortcuts → Add New → Command or Script
- Add a shortcut for each monitor:
- Command:
/full/path/to/oled toggle DP-1(or0,1,2fromoled list) - Shortcut: pick something like
Super+KP_1,Super+KP_2,Super+KP_3(I use these Windows-key + Numpad 1, 2, 3)
- Command:
Tip: Prefer output names (DP-1, HDMI-1, …) over indices if your monitor ordering changes.