# Ecran antihoraire portrait
#xrandr -o left
xrandr --output LVDS --rotate left
xsetwacom set "stylus" Rotate CCW
xsetwacom set "cursor" Rotate CCW
xsetwacom set "eraser" Rotate CCW
exit 0
Sauvegarde ce fichier sous "/usr/local/bin/portraitantihoraire"
et lance 'sudo chmod +x /usr/local/bin/portraitantihoraire' pour le rendre exécutable
#!/bin/bash
# Ecran horaire portrait
xrandr --output LVDS --rotate right
xsetwacom set "stylus" Rotate CW
xsetwacom set "cursor" Rotate CW
xsetwacom set "eraser" Rotate CW
exit 0
#!/bin/bash
# Ecran normal paysage
xrandr --output LVDS --rotate normal
xsetwacom set "stylus" Rotate none
xsetwacom set "cursor" Rotate none
xsetwacom set "eraser" Rotate none
exit 0
#!/bin/bash
# Ecran Inverse paysage
xrandr --output LVDS --rotate inverted
xsetwacom set "stylus" Rotate HALF
xsetwacom set "cursor" Rotate HALF
xsetwacom set "eraser" Rotate HALF
exit 0
Dans la section "Device" de "/etc/X11/xorg.conf" ajoutez:
Option "RandRRotation" "True" pour permettre la rotation de l'écran et
Option "DRI" "False" pour éliminer des mouvements sporadiques de l'écran et souris.
Dans la section "stylus" ajoutez:
Option "PressCurve" "50,0,100,50"
Option "Button2" "3"
Option "Button1" "1"
Dans la section "cursor" ajoutez:
Option "Button2" "3"
Option "Button1" "1"
Dans la section "eraser" ajoutez:
Option "Button1" "2"
Lancez le script approprié pour la rotation désiré de votre
écran.
Pour plus de convivialité, j'ai ajouté un dossier au panneau
d'outil qui contient des lanceurs «Launchers» pour chaque
scripts.
Exemple de script de rotation
Voici un script de rotation qui tourne l'écran de 90 degrés
à chaque lancement. Ce script est utilisé plus bas avec un
bouton de cadre.
#!/bin/sh
# Find the line in "xrandr -q --verbose" output that contains current
screen orientation and "strip" out current orientation.
# Modification pour discriminer entre trois ecrans dont LVDS
# (Nota : sur une seule ligne)
rotation="$(xrandr -q --verbose | grep 'LVDS 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 left
xrandr -o left
xsetwacom set stylus rotate CCW
xsetwacom set touch rotate CCW
xsetwacom set eraser rotate CCW
;;
left)
# -rotate to inverted
xrandr -o inverted
xsetwacom set stylus rotate HALF
xsetwacom set touch rotate HALF
xsetwacom set eraser rotate HALF
;;
inverted)
# -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