Our great sponsors
-
autorandr
Auto-detect the connected display hardware and load the appropriate X11 setup using xrandr
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
screenful
Awesome WM extension that allows automatically detect and configure connected/disconnected screens
I am using an xrandr helper (grobi) to set my screens up when connected. Problem is, my awesomewm config can only handle those changes on start. So I am just restarting awesomewm on screen change.
What I've done though is use autorandr for my current "pure" awesomewm install, and as far as I know that worked out of the box with almost no configuration.
You can either: - use awesome signals: screen.connect_signal("property::geometry", yourfunc) screen.connect_signal("list", yourfunc) ( https://awesomewm.org/doc/api/classes/screen.html#screen.list, https://awesomewm.org/doc/api/classes/screen.html#screen.geometry ) and poke s.outputs from function yourfunc(s) (along with parsing io.popen("xrandr -q --current") if needed), but that will only catch "connected & active" displays (i.e. not in xrandr --output XXX --off* state) - parse output (also with lua) of *xev -root -event randr -1 (that should catch everything) - use something along the lines of udev hook + /sys parsing if you use drm enabled driver (something along the lines of https://github.com/dluksza/screenful ) - use hybrid of above