Navigate trough Ubuntu virtual desktops using a joystick.
Code is tested on Ubuntu 16 and Chrome browser.
Requires python3.
Also we will need a program to control Ubuntu's window manager: sudo apt-get install wmctrl
The arduino file assumes the use of an Arduino Uno board with a HW-504 joystick control, connected as:
Arduino | HC-S501 |
---|---|
GND | GND |
+5V | +5V |
A0 | VRx |
A1 | VRy |
Digital2 | SW |
*Any arduino can be used as python will send the keyboard commands.
-
Flash
arduino-HW-504
to Arduino -
Run python script:
python3 python-os-nav.py [options]
(might requiresudo
)
Possible options:
--arduino <path/to/device>
- Specify location of arduino board.
- Default: '/dev/ttyUSB0'
- Short-hand:
-a
--debug <True/False>
- Prints to console position when joystick is moved.
- Default: False
- Short-hand:
-d
--sticky <True/False>
- When browser is selected up/down scrolls in page, left/right toggles tabs
- Default: False
- Short-hand:
-s
- to move out from scrolling inside the browser click the joystick
- you can move the selected window to a new workspace by clicking and holding on the joystick while navigating to the workspace (move up/down/left/right)
- update dependencies
- build GUI or executable file
- deal with sudo requirements