04-11-2017, 11:08 PM
(04-11-2017, 05:29 PM)torreydale link Wrote: Ok. If this is a solved issue, please mark it as such. For your convenience, the forum posting guidelines are here:
https://www.freecinema2022.gq/forums/intro...uidelines/
Maybe I didn't explain myself correctly:
The "Mouse and Touchpad" setting GUI works fine, but there's no option to disable de touchpad when an external mouse is connected to the computer.
I'm looking for some kind of daemon to "hear" when the external mouse is connected and then disables the touchpad and vice versa. So far the only thing I can do is a hotkey that toggles the state of the touchpad. But I'm looking for the system to do it automatically.
For anyone who's looking the script to toggles the Synaptic touchpad here is the code:
Code:
#!/bin/sh
#
# tp_toggle
#
# Toggle the touchpad on/off.
# Get the id number of the touchpad.
tp_id=`xinput list | grep -i touchpad | awk '{ print $6 }' | sed 's/id=//'`
# Find out whether the touchpad is enabled or not.
tp_enabled=`xinput list-props $tp_id | grep Device\ Enabled | awk '{ print $4 }'`
if [ $tp_enabled = 0 ]
then
# The touchpad is currently disabled, so turn it on.
xinput set-prop $tp_id "Device Enabled" 1
notify-send "TouchPad Active" "To deactivate press Super+M"
elif [ $tp_enabled = 1 ]
then
# The touchpad is currently enabled, so turn it off.
xinput set-prop $tp_id "Device Enabled" 0
notify-send "TouchPad Deactivated" "To activate press Super+M"
else
notify-send "TouchPad Toggle" "There's a problem."
exit 1
fi