autorandr
and dockd
have been around for a while. Both let you automatically switch to or from external displays when your laptop is plugged into a hub or hooked up to a docking station. But those are largely Linux- and Thinkpad-centric solutions. Let's do it the FreeBSD way.
Here are my requirements. I have an E-series Dell laptop with a docking station. My docking station is hooked up to one large Dell monitor. When the laptop is attached to the docking station, I want...
xautolock(1)
When the laptop is removed from the docking station, I want...
To do this we'll need the following:
devd(8)
for launching userland applications when kernel events occurxrandr(1)
for switching displaysxautolock(1)
for automatic lockingsysctl(8)
for changing hardware knobs