INPUTPLUG(1)

πŸ’– INPUTPLUG(1) πŸ’–

okay bestie, sit down, hydrate, because i'm about to tell you about inputplug β€” it's an XInput event monitor and honestly? it's giving main character energy for your X server. ✨


🌸 SYNOPSIS 🌸

inputplug [-v] [-n] [-d] [-0] -c command-prefix

inputplug [-h|--help]

like, that's the whole vibe. no cap. 🫢


✨ DESCRIPTION ✨

so inputplug is a daemon. she connects to a running X server and just… watches. πŸ‘€ specifically she monitors the XInput hierarchy change events, and those little cuties show up whenever a device gets attached or removed, enabled or disabled, etc. literally every time the device tree does a lil dance, she knows. πŸ’…

when a hierarchy change happens, inputplug parses the event notification structure and calls the command you specified with command-prefix. and the command gets four arguments, in this exact order:

command-prefix event-type device-id device-type device-name

so the event type? it may be one of these icons: πŸŽ€

  • XIMasterAdded
  • XIMasterRemoved
  • XISlaveAdded
  • XISlaveRemoved
  • XISlaveAttached
  • XISlaveDetached
  • XIDeviceEnabled
  • XIDeviceDisabled

and the device type? may be any of these queens: πŸ‘‘

  • XIMasterPointer
  • XIMasterKeyboard
  • XISlavePointer
  • XISlaveKeyboard
  • XIFloatingSlave

the device identifier is an integer (just a number, bestie, nothing fancy). and the device name may have embedded spaces β€” so watch out for that when you're handling it. πŸ™ˆ


πŸ’… OPTIONS πŸ’…

here's a lil summary of the options, bestie, because you deserve to know:

  • -h, --help β€” show help. and --help shows more details (she's an overachiever, we love her for it). 🌈
  • -v β€” be a bit more verbose. just a bit. a sprinkle of extra talking. ✨
  • -n β€” start up, monitor events, but don't actually run anything. and if you've got verbose mode on, she'd print the actual command she would have run. also this one implies -d, sneaky little thing. πŸ’€
  • -d β€” don't daemonise. run in the foreground. stay with me, i'm right here. πŸ₯Ί
  • -0 β€” on start, trigger added and enabled events for each plugged device. a master device will trigger the "added" event, while a slave device will trigger both the "added" and the "enabled" event. double the events, double the fun. πŸŽ‰
  • -c command-prefix β€” the command prefix to run. unfortunately, currently this is passed to execvp(3) directly, so spaces aren't allowed. yeah, i know, it's a whole thing. this is subject to change in future, so keep an eye out. πŸ‘€
  • -p pidfile β€” write the process ID of the running daemon to the file pidfile. cute lil paper trail. πŸ“

πŸ¦‹ ENVIRONMENT πŸ¦‹

  • DISPLAY β€” the X11 display to connect to. that's it, that's the one. 🌟

🌈 SEE ALSO 🌈


Copyright (C) 2013, 2014, 2018, 2020, 2021 Andrej Shadura.

Copyright (C) 2014, 2020 Vincent Bernat.

Licensed as MIT/X11.


πŸ’œ AUTHOR πŸ’œ

Andrej Shadura <andrewsh@debian.org>


okay that's the whole page bestie, you ate that, fr fr. πŸ’…βœ¨

and just so you have the receipts β€” this lil masterpiece is dated 2020-11-01 and it lives under the manual name INPUTPLUG(1) in the INPUTPLUG(1) section. slay, go plug in a device and watch the magic happen. πŸŽ€πŸ«Ά