Skip to content
Snippets Groups Projects
Commit 717c093a authored by Walmes Marques Zeviani's avatar Walmes Marques Zeviani
Browse files

Faz a mesa da Huion funcionar.

parent e8a8ff82
No related branches found
No related tags found
No related merge requests found
......@@ -32,9 +32,12 @@ lsusb | grep '256c:006d'
# Dispositivos Wacom conectados.
xsetwacom --list devices
ls | head -n 1
# Nome da mesa digitalizadora.
# WACOM=$(xsetwacom --list devices | grep "STYLUS" | awk '{print gensub(/(.+) stylus.*/, "\\1", "g")}')
WACOM=$(xsetwacom --list devices | grep "HID 256c:006d stylus" | awk '{print gensub(/(.+) stylus.*/, "\\1", "g")}')
# WACOM=$(xsetwacom --list devices | grep "HID 256c:006d" | head -n 1 | awk '{print gensub(/(.+) Pen stylus.*/, "\\1", "g")}')
WACOM="HID 256c:006d"
echo $WACOM
# Monitores disponíveis.
......@@ -57,21 +60,21 @@ echo "Monitor escolhido:"
echo $MAINMONITOR
# Mapeia a Wacom para o monitor principal.
if xsetwacom --list devices | grep -q "STYLUS"; then
xsetwacom --set "$WACOM stylus" MapToOutput $MAINMONITOR
if xsetwacom --list devices | grep -q "HID 256c:006d .* STYLUS"; then
xsetwacom --set "$WACOM Pen stylus" MapToOutput $MAINMONITOR
fi
if xsetwacom --list devices | grep -q "PAD"; then
if xsetwacom --list devices | grep -q "HID 256c:006d .* PAD"; then
xsetwacom --set "$WACOM Pad pad" MapToOutput $MAINMONITOR
fi
# Configura para manter mapeamento isométrico. -------------------------
if xsetwacom --list devices | grep -q "STYLUS"; then
if xsetwacom --list devices | grep -q "HID 256c:006d .* STYLUS"; then
# Determina a área do tablet.
AREALEFT=0
AREATOP=0
$(
xinput list-props "$WACOM stylus" | \
xinput list-props "$WACOM Pen stylus" | \
grep 'Wacom Tablet Area' | \
awk '{print gensub(/.*0, 0, ([0-9]+), ([0-9]+)/, "export AREARIGHT=\\1\nexport AREABOTTOM=\\2", "g")}'
)
......@@ -112,7 +115,7 @@ if xsetwacom --list devices | grep -q "STYLUS"; then
# xsetwacom set "$WACOM" MapToOutput $MAINMONITOR
# Define a área de trabalho para ter escala 1:1.
echo "Define área de trabalho para escala isométrica."
xsetwacom set "$WACOM stylus" \
xsetwacom set "$WACOM Pen stylus" \
Area $AREALEFT $AREATOP $RESULTRIGHT $RESULTBOTTOM
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment