Skip to content

Instantly share code, notes, and snippets.

@dapperfu
Created April 15, 2019 01:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dapperfu/b1dedc1af296fce061970a7dc85f3ec5 to your computer and use it in GitHub Desktop.
Save dapperfu/b1dedc1af296fce061970a7dc85f3ec5 to your computer and use it in GitHub Desktop.
WTF got plugged in?
#!/usr/bin/env bash
function pause(){
read -p "$*"
}
# Baseline
find /dev > /tmp/a
lsusb -v >> /tmp/a
xinput list >> /tmp/a
# Wait to plug in device.
pause 'Plug in USB device and press [Enter] to continue...'
# After.
find /dev > b
lsusb -v >> b
xinput list >> b
# Difference?
diff a b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment