Skip to content

Instantly share code, notes, and snippets.

@jimtremblay
Last active July 4, 2017 02:00
Show Gist options
  • Select an option

  • Save jimtremblay/a3267df2122eff276033baca30d74350 to your computer and use it in GitHub Desktop.

Select an option

Save jimtremblay/a3267df2122eff276033baca30d74350 to your computer and use it in GitHub Desktop.
Thinkpad X230 Tablet scripts and fixes

Install thinkpad-scripts from ppa:martin-ueding/stable

File to modify: /lib/udev/hwdb.d/60-keyboard.hwdb

  1. Change

KEYBOARD_KEY_6c=direction # rotate screen

for

KEYBOARD_KEY_6c=cyclewindows # rotate screen

  1. Execute sudo udevadm hwdb --update

  2. Reboot

Why? Ubuntu handle direction key (rotate button on the bezel) but not rotation of touch input. cyclewindows is not handled and free to be used and never had a problem with partial handling of rotation by ubuntu.

fix-pen-eraser need to be executed each login. Can be added to startup applications.

rotate can be executed each time rotate key on the bezel (TaskPane instead of RotateWindows) is pressed.

#!/bin/bash
xsetwacom set "Wacom ISDv4 E6 Pen eraser" Button 1 3
#!/bin/sh
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"
case "$rotation" in
normal)
thinkpad-rotate right
;;
right)
thinkpad-rotate half
;;
inverted)
thinkpad-rotate left
;;
left)
thinkpad-rotate normal
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment