Using exec in the config file would start an application on startup. Any application to be bound to a workspace when it starts using assign. However, how could one do a sequence of operations on start-up?

Specifically, would like to do the following:

  1. Open a terminal window in ws2
  2. Execute cd ~/Code && jupyter-lab
  3. Mod+R, Right, Right (increase browswer width by two steps)
  4. Swap the positions of the browser and terminal
  5. F11 (with browser window active)

The exec command can be useful in executing commands, such as in step 2, by executing a simple bash script. But how to do the above sequence of operations?

1 Answer 1


I don't use jupyter, and I don't know what terminal you are using, so I can't give a precise answer, but I believe that something like

i3-msg workspace 2
i3-msg resize grow width 10 px or 10 ppt

would move the focus to workspace 2 (creating it if necessary) and resize the currently active window. To change directory and launch "jupyter-lab", you could probably use something like

urxvt -cd ~/code -e "jupyter-lab"

depending on your terminal, or use xdotool type .... Likewise, to issue F11, you can use xdotool key F11, maybe with the --window option to specify the correct window.

EDIT: Code that worked for the OP

i3-msg workspace 2
sleep 1
xdotool type "cd ~/Code && jupyter-lab"
xdotool key KP_Enter
sleep 1
i3-msg resize grow  width 20 px or 20 ppt
i3-msg move left
xdotool key F11
  • 1
    Thank you; your code guided me to achieve what I required. If you don't mind, shall I edit your code to that which worked for me?
    – Ébe Isaac
    Dec 5, 2018 at 4:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .