Artificial intelligent assistant

Open and tile windows with shell script I cannot find this answer anywhere. No idea where to start. How do I open let's say `nemo`. I know I can set the window size using `-geometry`. But how do I tile it on a specific monitor/quadrant? I'm making a shell script that sets up a work space for a given directory.

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.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy fcf7f33c7d7f87bddb2fb78bdf6628c6