Skip to content

Instantly share code, notes, and snippets.

@altercation
Created January 21, 2013 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save altercation/4582988 to your computer and use it in GitHub Desktop.
Save altercation/4582988 to your computer and use it in GitHub Desktop.
current acpi handler for thinkpad x220 running arch
#!/bin/bash
case $* in
ac_adapter*) power auto ;; # unplug or plug ac cord
*LID*close) system sleep ;; # shut laptop lid
*TBLT*on*) displays tablet on ;; # rotate to tablet mode
*TBLT*off*) displays tablet off ;; # rotate to laptop mode
*0000500c) trigger Print ;; # undock tablet pen
*0000500b) trigger shift+Print ;; # dock tablet pen
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment