I am using Ubuntu 20.04, and I'm one of those who enjoys Gnome. Even so, sometimes I like tiling my terminals for work. Usually I'll set them up like so:
I use the Terminator terminal to achieve that effect.
Now, it takes a lot of hotkeys to get to that setup. I have Terminator set as Super-T
; then I need to split vertically (Ctrl-Shift-O
), then split horizontally (Ctrl-Shift-O
). Then I shift the terminals around with Ctrl-Down
and Ctrl-Right
. I'd like to create a single hotkey that can sequence all those combinations in a single press. I tried to write a script using xdotool
:
#!/bin/bash
xdotool key super+j
xdotool key shift+F1
xdotool key super+Up
xdotool key ctrl+shift+o
xdotool key ctrl+shift+e
xdotool key ctrl+shift+Down
xdotool key ctrl+shift+Down
xdotool key ctrl+shift+Down
xdotool key ctrl+shift+Down
xdotool key ctrl+shift+Down
xdotool key ctrl+shift+Down
xdotool key ctrl+shift+Down
xdotool key alt+Down
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key alt+Right
xdotool ipython
This was going to be a quick and dirty start to get done what I need to get done, but all that it does is open a new workspace (Super-J
) and a Terminator instance (Shift-F1
). The other keypresses don't register in the Terminator window in order to effect the necessary window customizations.
Does anyone have a better recommendation of how to do this?