Making Wacom Toggle Display Button

This topic is dedicated to Open Beta versions. Post here your comment, bugs notifications and ideas about the Android version !
Locked
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

Making Wacom Toggle Display Button

Post by Mads Juul »

Hi not directly concerning TV Paint but using wacom under Linux
I'm using TV Paint on Ubuntu 11.4 I have 2 displays my Laptop(LVDS1) and another display (VGA1).
I have made a way to "Display Toggle" between the 2 displays.


1) save this script for example in the file "~/wacom_displayToggle.sh"

Code: Select all

#!/bin/sh
temp="$HOME/wacom_displayToggle.tmp"
display=`head -1 $temp`
echo "$display"
if [ $display = "LVDS1" ]
then 
echo "VGA1">"$temp"
xsetwacom set "Wacom Intuos4 8x13 stylus" MapToOutput VGA1
fi

if [ $display != "LVDS1" ]
then 
echo "LVDS1">"$temp"
xsetwacom set "Wacom Intuos4 8x13 stylus" MapToOutput LVDS1
fi
Put in your own device instead of "Wacom Intuos4 8x13 stylus" for instance "Wacom Intuos2 6x8 stylus"

2) in System>Preferences>Keyboard Shortcuts
add a new
name: TDisplay Toggle
Command sh /home/your user name/wacom_displayToggle.sh

assign a short cut I have choosen "f10"

3) run this command in terminal

Code: Select all

xsetwacom set "Wacom Intuos4 8x13 stylus" Button 3 "key f10"
now when you click to top mouse button you flip between you 2 displays.
I dont know if there is a smarter way. please say if so but I just wan't to share this if anybody is interested.
And maybe I can learn something from the comments
-Mads
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

Re: Making Wacom Toggle Display Button

Post by Mads Juul »

You can find the name of your Wacom Device by Typing in terminal
When I made the script I was on a Intous4 today I'm on my Cintiq so I have to modify the shell script

Code: Select all

xsetwacom --list
it gives the following output with my Cintiq

Code: Select all

Wacom Cintiq 21UX2 eraser       	id: 10	type: ERASER    
Wacom Cintiq 21UX2 pad          	id: 11	type: PAD       
Wacom Cintiq 21UX2 stylus       	id: 12	type: STYLUS    
You can find the display name by the following command

Code: Select all

xrandr

it gives this output on my laptop

Code: Select all

Screen 0: minimum 320 x 200, current 2966 x 1200, maximum 8192 x 8192
LVDS1 connected 1366x768+0+432 (normal left inverted right x axis y axis) 344mm x 193mm
   1366x768       60.0*+
   1360x768       59.8     60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1600x1200+1366+0 (normal left inverted right x axis y axis) 432mm x 324mm
   1600x1200      60.0*+
   1280x1024      60.0  
   1024x768       60.0  
   800x600        60.3  
   640x480        60.0  
DP1 disconnected (normal left inverted right x axis y axis)
Where I can see that my Cintiq Is connected to HDMI1

-Mads
User avatar
Fabrice
Posts: 10077
Joined: 17 Jul 2007, 15:00
Contact:

Re: Making Wacom Toggle Display Button

Post by Fabrice »

Thanks for sharing Mads.

It's really helpful for the Linux community. :)
Fabrice Debarge
User avatar
Eric Scholl
Posts: 1303
Joined: 04 Apr 2011, 14:40

Re: Making Wacom Toggle Display Button

Post by Eric Scholl »

Right, Thank you for sharing mads :D
Locked