Newval = "disabled" if curr = "'enabled'" else "enabled" Newval = "false" if curr = "true" else "true" Key = ".touchpad" val = "touchpad-enabled"Ĭurr = subprocess.check_output().decode("utf-8").strip() Since you can enable/disable touchpad from System Settings, and I am pretty sure System Settings does use gsettings, it looks like the method below should do the job, on your Dell as well. If you can change settings by gsettings, generally it is the preferred option. Notify-send -u low -i mouse "Trackpad enabled" Notify-send -u low -i mouse "Trackpad disabled" If xinput list-props 13 | grep "Device Enabled (168).*1" >/dev/null I've attached this to a shortcut key and it works a charm. You can do it in a one liner, but this way you get a nice notification, too. I have used 15 for $DEVICE_ID EDIT - thanks to the answer below here's my toggle script but I want to be able to map this to a keyboard shortcut, so I'm looking for a command line solution.īonus points if you answer works in Gnome-Shell as well as Unity :-) EDIT: output of xinput as requested in comment. It still works! $ xinput set-prop $DEVICE_ID "Device Enabled" 0 I am trying to tweak the touchpad on Ubuntu 16.04 but none of the usual methods seem to work.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |