Found an odd "hacky" way to do it. That is to simulate the keyboard shortcut for tiling on the window (ie super+Left
) using xdotool
.
# Launch the program (ie nemo)
gtk-launch nemo
# Wait 0.5 seconds for the window to get open
# and then get the window id using xdotool
sleep 0.5
$WINDOW_ID=`xdotool search --name Home` # "Home" is the title of the nemo window
# Simulate a tiling shortcut (tile left)
xdotool windowactivate $WINDOW_ID
xdotool key super+Left
By all means I hate my own answer. It's very hacky and dirty and not flexable whatso ever. But none the less, does what it needs to.