Thursday, November 7, 2019

i3 layout reload configuration

Recently started playing around with i3. I liked it so far. It can open all the applications where you need after a restart. After learning how to split the screens etc, get to your desired configuration. Once fixed, execute following : 

i3-save-tree > i3.json
We need to edit json file so that "class" entries in "swallows" sections are un-commented.

Enter following in config "~/.config/i3/config" :

exec load_i3_layout.sh
Where as contents of the shell scripts are :

i3-msg 'workspace 1; append_layout i3.json'
i3-msg 'exec /usr/bin/chromium-browser'
i3-msg 'exec /usr/bin/dbeaver'
i3-msg 'exec /snap/bin/pycharm-community'
i3-msg 'exec /usr/bin/nautilus'
i3-msg 'exec /usr/bin/gnome-terminal'
i3-msg 'exec /usr/bin/chromium-browser'
This will open up all the windows at your needed locations.