suite à des petits soucis avec Touchpad-Indicator, qui a parfois du mal à désactiver mon touchpad, j'ai décidé de contourner le problème avec un script shell.
le script en question (récupéré chez nos confrères anglais), c'est le seul qui fonctionne correctement
Code : Tout sélectionner
!/usr/bin/env bash
## Get the touchpad id. The -P means perl regular expressions (for \K)
## the -i makes it case insensitive (better portability) and the -o
## means print only the matched portion. The \K discards anything matched
## before it so this command will print the numeric id only.
TID=$(xinput list | grep -iPo 'touchpad.*id=\K\d+')
## Run every second
while :
do
## Disable the touchpad if there is a mouse connected
## and enable it if there is none.
xinput list | grep -iq mouse && xinput disable "$TID" || xinput enable "$TID"
## wait one second to avoind spamming your CPU
sleep 1
done
par exemple, au moment où je débranche ma souris, et que le touchpad s'active, eh bin qu'il y ait une notification visuelle avec un message que je choisirais.
et idem quand je rebranche la souris pour désactiver le touchpad.
ou une notification sonore, ou les deux (visuelles + sonores).
et si il est possible d'avoir un icone dans le panel pour indiquer l'état du touchpad (actif ou inactif)
en faite un peu comme touchpad-indicator, mais que je mettrais dans mon script
vous pensez que c'est réalisable à partir d'un script shell, ou pas du tout.??
j'utilise ArchLinux avec Cinnamon 3.6.7-1
Merci