Skip to content

Instantly share code, notes, and snippets.

View mmaz's full-sized avatar

Mark Mazumder mmaz

View GitHub Profile
@mmaz
mmaz / RotateButton.desktop
Created June 21, 2011 21:58
Ubuntu Unity 11.04 .desktop file for adding a shell script button (screen rotation in this case) to the Launcher
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=/usr/share/icons/gnome/256x256/devices/video-display.png
Exec=/path/to/script/TabletRotation.sh
Name[en_US]=Rotate Tablet PC Screen
Comment[en_US]=Toggles Tablet PC rotation
@mmaz
mmaz / TabletRotation.sh
Created June 21, 2011 21:37
Rotate screen in Ubuntu for a Lenovo X60
#!/bin/bash
rotation=`xrandr --query --verbose | grep "LVDS1" | awk '{print $5}'`
if [ $rotation = "normal" ]
then
xsetwacom set "Serial Wacom Tablet stylus" Rotate half
xrandr -o inverted
else
xsetwacom set "Serial Wacom Tablet stylus" Rotate none
xrandr -o normal