xplugd is a UNIX daemon that executes a script on X input and RandR changes, i.e., when a, keyboard, mouse. or a monitor is plugged in or unplugged. Useful in combination with lightweight setups, e.g. when running an X window manager like Awesome, Fluxbox, or similar to detect when docking or undocking a laptop.