DEBIAN PRO

DEBIAN PRO
DEBIAN

lunes, 13 de febrero de 2017

Debian Tactiles


En estos dias configuré un display táctil y touchpad para un equipo "transformer", donde el display se gira y parece una tablet.
Un excelente equipo y ahora demás bastante bueno para leer y manejarlo de manera táctil.

El script que usé debajo, y programé el botón de "giro" para que lo invoque y gire a la izquierda o vuelva al modo normal.
En XFCE, dentro del APP "Keyboard", luego "Application shorcut" y agregar una entrada que invoque al script.



#!/bin/bash
#
# rotate_desktop.sh
#
# Rotates modern Linux desktop screen and input devices to match. Handy for
# convertible notebooks. Call this script from panel launchers, keyboard
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.).
#
# Using transformation matrix bits taken from:
# https://wiki.ubuntu.com/X/InputCoordinateTransformation
#

if [ -f /tmp/pantalla.txt ]
then
xrandr --output eDP-1 --rotate normal
xinput set-prop 'FocalTechPS/2 FocalTech Touchpad' "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1
xinput set-prop 'Atmel' "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1

killall florence

rm /tmp/pantalla.txt

else
xrandr --output eDP-1 --rotate right
xinput set-prop 'FocalTechPS/2 FocalTech Touchpad' "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1
xinput set-prop 'Atmel' "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1

florence &

echo " " > /tmp/pantalla.txt
chmod 777 /tmp/pantalla.txt

fi

exit 0
#
# fin
#



No hay comentarios:

Publicar un comentario