GatewayC-141XL

Attachment 'rotation.txt'

Download

   1 #!/bin/sh 
   2 
   3 # Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation. 
   4 
   5 rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o  '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')" 
   6 
   7 # Using current screen orientation proceed to rotate screen and input tools. 
   8 
   9 case "$rotation" in 
  10     normal) 
  11 #    -rotate to the left 
  12     xrandr -o left 
  13     xsetwacom set stylus rotate CCW 
  14     xsetwacom set touch rotate CCW 
  15     xsetwacom set eraser rotate CCW 
  16     ;; 
  17     left) 
  18 #    -rotate to inverted 
  19     xrandr -o inverted 
  20     xsetwacom set stylus rotate HALF 
  21     xsetwacom set touch rotate HALF 
  22     xsetwacom set eraser rotate HALF 
  23     ;; 
  24     inverted) 
  25 #    -rotate to the right 
  26     xrandr -o right 
  27     xsetwacom set stylus rotate  CW 
  28     xsetwacom set touch rotate CW 
  29     xsetwacom set eraser rotate CW  
  30     ;; 
  31     right) 
  32 #    -rotate to normal 
  33     xrandr -o normal 
  34     xsetwacom set stylus rotate NONE 
  35     xsetwacom set touch rotate NONE 
  36     xsetwacom set eraser rotate NONE 
  37     ;; 
  38 esac

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2009-03-26 02:14:44, 1.1 KB) [[attachment:rotation.txt]]
  • [get | view] (2009-03-26 02:15:29, 3.4 KB) [[attachment:xorg.txt]]
 All files | Selected Files: delete move to page

You are not allowed to attach a file to this page.