Gtkdialog script to map Veikk A50 tablet area only on a monitor when use dual monitor

For discussions about programming, and for programming questions and advice


Moderator: Forum moderators

Post Reply
recobayu
Posts: 64
Joined: Tue Jul 14, 2020 9:34 am
Has thanked: 11 times
Been thanked: 8 times

Gtkdialog script to map Veikk A50 tablet area only on a monitor when use dual monitor

Post by recobayu »

Code: Select all

#!/bin/bash
# make veikk a50 only on a monitor in dual monitor

# list semua monitor
ganti(){
	veikk_id=$(xinput |grep "VEIKK A50".*pointer|cut -f2|cut -c 4-5|head -1)
	#echo "$veikk_id"
	xsetwacom --set "$veikk_id" MapToOutput $cbMonitor
}
export -f ganti
# reset
reset(){
	veikk_id=$(xinput |grep "VEIKK A50".*pointer|cut -f2|cut -c 4-5|head -1)
	AllMonitors=$(xrandr|grep current|awk '{print $8$9$10"+0+0"}'|sed 's/,//')
	xsetwacom --set "$veikk_id" MapToOutput $AllMonitors
}
export -f reset

export guiku='
<vbox>
	<hbox>
	<text>
		<label>Monitors avaliable:</label>
	</text>
	
	<comboboxentry active="0">
		<variable>cbMonitor</variable>
		<input>xrandr|grep " connected"|cut -d" " -f1</input>
		<action>ganti</action>
	</comboboxentry>
	</hbox>
	
	<button>
		<label>reset to All monitor</label>
		<action>reset</action>
	</button>

	<button ok></button>
</vbox>'

gtkdialog -p guiku

Attachments
veikk a50ku.png
veikk a50ku.png (8.52 KiB) Viewed 239 times
Last edited by recobayu on Mon Mar 07, 2022 9:57 am, edited 1 time in total.
recobayu
Posts: 64
Joined: Tue Jul 14, 2020 9:34 am
Has thanked: 11 times
Been thanked: 8 times

Re: Gtkdialog script to map Veikk A50 tablet area only on a monitor when use dual monitor

Post by recobayu »

Alhamdulillah, now Veikk has the driver for linux on their website:
https://www.veikk.com/support/download.html
.deb and .rpm available there.

Read more ..
https://github.com/jlam55555/veikk-linu ... /issues/71

Post Reply

Return to “Programming”