SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2013-04-10 12:42:24

Ikhnaton
New Member
Registered: 2013-04-05
Posts: 5
Website

[SOLVED] Tablet mode on X61t

#!/usr/bin/ruby
$orientation = `xrandr -q | grep "1400 x 1050"`
if ($orientation.length != 0 )
	puts "Landscape to Portrait"
	`/home/yourusername/xrotate 3 && metacity --replace`
else
	puts "Portrait"
	`/home/yourusername/xrotate 0 && compiz --replace`
end

Last edited by Ikhnaton (2013-04-12 07:13:34)

Offline

Help fund CrunchBang, donate to the project!

#2 2013-04-12 07:12:54

Ikhnaton
New Member
Registered: 2013-04-05
Posts: 5
Website

Re: [SOLVED] Tablet mode on X61t

#!/bin/sh

# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.

rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o  '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"

# Using current screen orientation proceed to rotate screen and input tools.

case "$rotation" in
    normal)
    # rotate to the right
    xrandr -o right
    xsetwacom set stylus rotate  cw
    xsetwacom set touch rotate cw
    xsetwacom set eraser rotate cw
    ;;
    right)
    # rotate to normal
    xrandr -o normal
    xsetwacom set stylus rotate none
    xsetwacom set touch rotate none
    xsetwacom set eraser rotate none
    ;;
esac

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: bleh

Debian Logo