Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-03-14 08:38:01

rogue_ronin
Member
Registered: 2015-03-03
Posts: 28
Windows 10Firefox 128.0

Removable Drives and Media: tablet

Could anyone confirm that there might be a bug when plugging in a tablet?

Or perhaps it's my bash script? It defines my tablet to be restricted to a single of my three monitors:

#!/bin/bash
TABLET_ID=$(xinput | grep '10594 Pen Pen' | cut -f 2 | cut -c 4-5)
MONITOR_SELECTION=$(zenity --list --title='Select Monitor' --radiolist --column 'Selection' --column 'Monitor' FALSE 'Left' TRUE 'Center' FALSE 'Right' --height=450)

case $MONITOR_SELECTION in

     Left)
     MONITOR="DP-2"
     ;;

     Center)
     MONITOR="DP-3"
     ;;

     Right)
     MONITOR="DP-4"
     ;;

     *)
     exit 1
     ;;
esac

xinput map-to-output $TABLET_ID $MONITOR

echo $TABLET_ID $MONITOR_SELECTION $MONITOR

exit

When I plug in the tablet, I get a dozen popup zenity dialogs -- it's clearly being called multiple times (I have to disconnect the tablet to stop the spawning.)


==================
EndeavourOS (Arch)
==================

Offline

#2 2025-03-14 17:41:01

k3dAR
Member
From: Czech Republic
Registered: 2022-07-27
Posts: 109
LinuxChrome 134.0

Re: Removable Drives and Media: tablet

don't have tablet to try, bud maybe yout is represent as multiple devices? anyway you can try add to start of script some checking if running, and if yes then exit...

Added later 04 min 06 s:
ex. before TABLET_ID line add:

pgrep -f 'zenity.*Select Monitor' && exit

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 521.78 KiB (Peak: 524.73 KiB) ]