Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

Package

xinput shortcuts

License

GNU GPL

Description

Enables/disables xinput devices.

First argument represents device state (0 for disable and 1 for enable). Second argument represents device name.

By default we operate with "Synaptics TouchPad" but it's possible to have custom device names.

Installation

  1. Copy the file "operate_xinput_device.py" to ~/.scripts/ directory (make sure to create one first).

  2. If you wish, you can edit your .bashrc file and add shortcuts:

    >>> alias disable_touchpad='python ~/.scripts/operate_xinput_device.py 0 Synaptics TouchPad'
    >>> alias enable_touchpad='python ~/.scripts/operate_xinput_device.py 1 Synaptics TouchPad'
    

You could also use shell script to install the xinput shortcuts automatically. To do that, please execute the "install.sh" script from your terminal:

$ chmod +x install.sh"

$ ./install.sh

Usage examples

To enable Synaptics TouchPad, type in terminal:

$ python ~/.scripts/operate_xinput_device.py 1 Synaptic TouchPad

To disable Genius Optical Mouse, type in terminal:

$ python ~/.scripts/operate_xinput_device.py 0 Genius Optical Mouse

If you have used provided installation script to install "xinput shortcuts", you can just type the following in terminal:

$ disable_touchpad

$ enable_touchpad

Press release

https://bitbucket.org/barseghyanartur/xinput_shortcuts

It's a very tiny piece of code which allows you to disable/enable the touchpad from terminal.

Simply follow the Instructions below:

  1. Download https://bitbucket.org/barseghyanartur/xinput_shortcuts/get/cae698b61e4c.zip
  2. Unpack it somewhere.
  3. Open terminal and go to the directory where you have unpacked it.
  4. $ chmod +x install.sh"
  5. $ ./install.sh

Now you can disable/enable touchpad by typing "disable_touchpad" or "enable_touchpad" commands in your terminal.

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.