~fnux/monitor-handler

Simple scripts to manage monitor events (plug/unplug).
8a9febd3 — Timothée Floure 4 months ago
Handler: match monitor EDID and move "configuration" to external file
acde4c63 — Timothée Floure 4 months ago
Remove duplicate of monitor-event-handler
ab188bf2 — Timothée Floure 4 months ago
Fix README extension (= markdown)

refs

master
browse log

clone

read-only
https://git.sr.ht/~fnux/monitor-handler
read/write
git@git.sr.ht:~fnux/monitor-handler

monitor-handler

I have access (home, work, club room, ...) to various external screen and often plug/unplug them to my laptop. Since I don't use a full Desktop Environment, their configuration is not automagically handled whatever us shipped with Gnome, KDE or similar nice but bloated DE. I figured it would not be to difficult to write a few scripts to handle it myself:

  • monitor-event-listener: simple C program listening for X event. It calls monitor-event-handler with the output name and action (plugged or unplugged) when a "monitor event" is detected.
  • monitor-event-handler: simple shell script that takes the output name and action as arguments, compute the md5 hash of the EDID and feed $XDG_CONFIG_HOME/monitor-handler-rules which contains preconfigured actions.