Xdotool
From wikinotes
xdotool is a tool to control your Xorg server. You can:
- get information about focused desktops/windows
- change focused desktop/windows
- change number of desktops
- execute keys/clicks within target windows
- lots more
Xdotool itself does not record keybindings, but used with xbindkeys, you can bind keys to other keys.
xdotool key Home ## Virtual Press Home Key
xdotool key Ctrl+Alt+a Backspace ## Virtual Key Combo (ctrl+alt+a, then backspace)
xdotool get_num_desktops
xdotool get_desktop
xdotool set_desktop