Rotation

From AlwaysInnovating

Jump to: navigation, search

Rotation of the display is handled by the ai-daemon. The user interface to change the rotation is accessible through the Gnome menu > System Toolse > Rotation Settings. It can also be launched from the following command line:

/usr/share/ai-daemon/display.py


Main command-line

The rotation settings can be modified with ai_daemon_client:

ai_daemon_client --{set,get}-{threshold-low,threshold-high,buttons-mode,rotation-mode,current-rotation} [val]
  • get-threshold-low, get-threshold-high, set-threshold-low [val], and set-threshold-high [val] retrieve or set the value of the thresholds for the rotation detection.

The touchbook has two concept it uses for rotation: roll and pitch. Roll is the amount it is leaning forward/backward while pitch is the left/right lean. By setting the high and low values in degrees (range 0 - 90) you can make the auto-rotation not occur until one value is above the high setting AND the second value is below the low setting. In this manner you can force the rotation to "stick" to an orientation, even in the event you lean slightly to the side, without disabling auto-rotation completely.

  • get-current-rotation and set-current-rotation [0|1|2|3] retrieves or sets the current rotation (0 for 0, 1 for 90, 2 for 180, 3 for 270 degrees).
  • get-rotation-mode, set-rotation-mode [0|1|2] retrieves or sets how the rotation is handled:

- 0: Rotation in tablet mode only.

- 1: Rotation in all situation.

- 2: No rotation.

  • get-buttons-mode, set-buttons-mode [0|1] retrieves or sets if the buttons are handled by the daemon:

- single click on power button: turn on/off the screen

- click for more than two seconds on power button: turn on screen if needed and launch log-off window

- click for more than four seconds on power button: hard shutdown

- single click on middle AI button: launch the start menu

- double click on middle AI button: launch the keyboard


Other options

Though it's not recommended to do it this way, it's possible to force the rotation of the display:

/usr/bin/ai/desktop/rotation.sh -f 0|[1|90]|[2|180]|[3|270]
Personal tools