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
e2cd3475
Commit
e2cd3475
authored
1 year ago
by
Walmes Marques Zeviani
Browse files
Options
Downloads
Patches
Plain Diff
Modificações na mesa Wacom Bamboo.
parent
cc14fa9a
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
wacom_bamboo_configure.sh
+11
-10
11 additions, 10 deletions
wacom_bamboo_configure.sh
with
11 additions
and
10 deletions
wacom_bamboo_configure.sh
+
11
−
10
View file @
e2cd3475
...
@@ -28,7 +28,8 @@ lsusb | grep 'Wacom'
...
@@ -28,7 +28,8 @@ lsusb | grep 'Wacom'
xsetwacom
--list
devices
xsetwacom
--list
devices
# Nome da mesa digitalizadora.
# Nome da mesa digitalizadora.
WACOM
=
$(
xsetwacom
--list
devices |
grep
"STYLUS"
|
awk
'{print gensub(/(.+) stylus.*/, "\\1", "g")}'
)
# WACOM=$(xsetwacom --list devices | grep "STYLUS" | awk '{print gensub(/(.+) stylus.*/, "\\1", "g")}')
WACOM
=
"Wacom Bamboo Connect"
echo
$WACOM
echo
$WACOM
# Monitores disponíveis.
# Monitores disponíveis.
...
@@ -59,24 +60,24 @@ echo $MAINMONITOR
...
@@ -59,24 +60,24 @@ echo $MAINMONITOR
# xsetwacom --set "Wacom Bamboo Connect Pen eraser" MapToOutput $MAINMONITOR
# xsetwacom --set "Wacom Bamboo Connect Pen eraser" MapToOutput $MAINMONITOR
# Mapeia a Wacom para o monitor principal.
# Mapeia a Wacom para o monitor principal.
if
xsetwacom
--list
devices |
grep
-q
"STYLUS"
;
then
if
xsetwacom
--list
devices |
grep
-q
"
Wacom Bamboo Connect .*
STYLUS"
;
then
xsetwacom
--set
"
$WACOM
stylus"
MapToOutput
$MAINMONITOR
xsetwacom
--set
"
$WACOM
Pen
stylus"
MapToOutput
$MAINMONITOR
fi
fi
if
xsetwacom
--list
devices |
grep
-q
"ERASER"
;
then
if
xsetwacom
--list
devices |
grep
-q
"
Wacom Bamboo Connect .*
ERASER"
;
then
xsetwacom
--set
"
$WACOM
eraser"
MapToOutput
$MAINMONITOR
xsetwacom
--set
"
$WACOM
Pen
eraser"
MapToOutput
$MAINMONITOR
fi
fi
if
xsetwacom
--list
devices |
grep
-q
"PAD"
;
then
if
xsetwacom
--list
devices |
grep
-q
"
Wacom Bamboo Connect .*
PAD"
;
then
xsetwacom
--set
"
$WACOM
pad"
MapToOutput
$MAINMONITOR
xsetwacom
--set
"
$WACOM
Pad
pad"
MapToOutput
$MAINMONITOR
fi
fi
# Configura para manter mapeamento isométrico. -------------------------
# Configura para manter mapeamento isométrico. -------------------------
if
xsetwacom
--list
devices |
grep
-q
"STYLUS"
;
then
if
xsetwacom
--list
devices |
grep
-q
"
Wacom Bamboo Connect .*
STYLUS"
;
then
# Determina a área do tablet.
# Determina a área do tablet.
AREALEFT
=
0
AREALEFT
=
0
AREATOP
=
0
AREATOP
=
0
$(
$(
xinput list-props
"
$WACOM
stylus"
|
\
xinput list-props
"
$WACOM
Pen
stylus"
|
\
grep
'Wacom Tablet Area'
|
\
grep
'Wacom Tablet Area'
|
\
awk
'{print gensub(/.*0, 0, ([0-9]+), ([0-9]+)/, "export AREARIGHT=\\1\nexport AREABOTTOM=\\2", "g")}'
awk
'{print gensub(/.*0, 0, ([0-9]+), ([0-9]+)/, "export AREARIGHT=\\1\nexport AREABOTTOM=\\2", "g")}'
)
)
...
@@ -117,7 +118,7 @@ if xsetwacom --list devices | grep -q "STYLUS"; then
...
@@ -117,7 +118,7 @@ if xsetwacom --list devices | grep -q "STYLUS"; then
# xsetwacom set "$WACOM" MapToOutput $MAINMONITOR
# xsetwacom set "$WACOM" MapToOutput $MAINMONITOR
# Define a área de trabalho para ter escala 1:1.
# Define a área de trabalho para ter escala 1:1.
echo
"Define área de trabalho para escala isométrica."
echo
"Define área de trabalho para escala isométrica."
xsetwacom
set
"
$WACOM
stylus"
\
xsetwacom
set
"
$WACOM
Pen
stylus"
\
Area
$AREALEFT
$AREATOP
$RESULTRIGHT
$RESULTBOTTOM
Area
$AREALEFT
$AREATOP
$RESULTRIGHT
$RESULTBOTTOM
fi
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