From 2f5ea4d741f2b4c125849c3c19772fef6e1ee9b4 Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Tue, 21 Oct 2025 21:25:41 -0400 Subject: draft cleanup and add wwoo stories --- ...mate-display-switching-with-devd-on-freebsd.php | 41 ---------------------- 1 file changed, 41 deletions(-) delete mode 100644 drafts/2021-09-26-forget-autorandr-automate-display-switching-with-devd-on-freebsd.php (limited to 'drafts/2021-09-26-forget-autorandr-automate-display-switching-with-devd-on-freebsd.php') diff --git a/drafts/2021-09-26-forget-autorandr-automate-display-switching-with-devd-on-freebsd.php b/drafts/2021-09-26-forget-autorandr-automate-display-switching-with-devd-on-freebsd.php deleted file mode 100644 index 8ae50f7..0000000 --- a/drafts/2021-09-26-forget-autorandr-automate-display-switching-with-devd-on-freebsd.php +++ /dev/null @@ -1,41 +0,0 @@ - - -

- 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... -

- -
    -
  1. The laptop to use the larger, external monitor exclusively (no mirroring)
  2. -
  3. The default sound device to switch to the external monitor's speakers
  4. -
  5. Disable automatic locking via xautolock(1)
  6. -
  7. Disable suspend on lid close
  8. -
- -

When the laptop is removed from the docking station, I want...

- -
    -
  1. The laptop to switch to its internal display
  2. -
  3. The default sound device to switch back to the internal laptop speakers
  4. -
  5. Automatic locking to re-enable
  6. -
  7. Suspend on lid close to re-enable
  8. -
- -

To do this we'll need the following:

- -
    -
  1. devd(8) for launching userland applications when kernel events occur
  2. -
  3. xrandr(1) for switching displays
  4. -
  5. xautolock(1) for automatic locking
  6. -
  7. sysctl(8) for changing hardware knobs
  8. -
  9. Some core utilities and a tiny shell script to bring it all together
  10. -
-- cgit v1.2.3