This collection of scripts is intended for the Lenovo ThinkPad X220 Tablet. You can still use them with the regular X220 machine, but only think-rotate will probably be useless for you then. I think that most scripts will also be handy for other ThinkPad models, I have not tested them though.
The buttons on the front of the screen are mapped, so that you can use them. I have think-rotate on that 90° button and think-rotate flip on that 270° button.
In short, this script fixes or improves the following:
There is also a script that will enable an external monitor and correctly sets the Wacom input devices onto the internal screen only. This is very handy if you use the docking station (UltraBase) with an external monitor.
It will also set the volume to full when docking and to half when un-docking, disable and enable the wireless LAN if a LAN cable is attached. And it sets the brightness to a fixed value. You can set this value in a config file to match your external monitor.
udev is instructed to call think-dock on when you set your laptop into the docking station, and think-dock off when you press the eject-button. That way, you do not have to worry about managing screens. Just set your laptop and it will take care of everything.
You will not need to call this manually, it will be called on system startup. It sets the key codes for the bezel keys in order for you to use them.
This script will be called when you press the microphone mute button. It will mute the microphone and toggle the LED. It currently uses the power button LED for status in order to avoid a kernel module patch. [mutemic]
With this script, you can rotate the screen in any direction you like and it will also rotate the pen and touch input.
It will also disable the track point (the xinput id is automatically queried) so that the back of the screen does not move your mouse if there is any force on the side of the screen.
This script toggles the (finger) touch screen. This might be handy, if you are taking notes with the pen only.
This script toggles the touch pad.
# make install
This will install the scripts to /usr/bin/ and add the necessary hooks so that they are run automatically. It also installs a script in /etc/init.d/ that fixes the key codes for the bezel keys so that you can use them for things such as running think-rotate.
If you want to have the manual pages installed, type make before you run make install. This needs to have rst2man from python-docutils installed.
You can install this as a package from my Ubuntu PPA:
$ sudo -s # add-apt-repository ppa:martin-ueding/stable # apt-get update # apt-get install think-rotate
Please see the individual manual pages for details on each program:
I took the script, that served as a basis for think-rotate from a forums entry where the original author said:
“Put this in a file blah.sh anywhere, and do whatever you want with it!” [aeharding]
The changes that I made to that script are licensed under the GPLv2.
All other scripts are just licensed under GPLv2.
Since there are more scripts than buttons, I added a drawer with all the programs to my KDE Panel. It looks like this:
Add a new “folder view” to your panel and set the following options:
(1) Go into the first tab and (2) set the folder to /usr/share/applications.
(3) Then go to the “Filter” tab and (4) set think-*.desktop as the filter. That will only list scripts from this collection.
download the source
Other releases: think-rotate download folder
You can also download (clone) the git repository from:
|[mutemic]||(1, 2) http://askubuntu.com/a/137278/12824|