Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
linux-config
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Walmes Marques Zeviani
linux-config
Commits
717c093a
Commit
717c093a
authored
1 year ago
by
Walmes Marques Zeviani
Browse files
Options
Downloads
Patches
Plain Diff
Faz a mesa da Huion funcionar.
parent
e8a8ff82
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
huion_h1060p_configure.sh
+10
-7
10 additions, 7 deletions
huion_h1060p_configure.sh
with
10 additions
and
7 deletions
huion_h1060p_configure.sh
+
10
−
7
View file @
717c093a
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment