i3: use a saved layout to spawn Emacs workspace

This works great!
This commit is contained in:
Vincent Bernat 2021-07-05 21:59:05 +02:00
parent b17a6e2bfc
commit 75779554d7
2 changed files with 16 additions and 1 deletions

2
config
View file

@ -160,7 +160,7 @@ for_window [window_role="PictureInPicture"] floating enable
# Start stuff # Start stuff
exec_always --no-startup-id systemctl --user start --no-block i3-session.target exec_always --no-startup-id systemctl --user start --no-block i3-session.target
exec --no-startup-id i3-msg "\ exec --no-startup-id i3-msg "\
workspace number 1; exec emacs; exec $term; exec $term; \ workspace number 1; append_layout ~/.config/i3/ws-emacs.json; exec emacs; exec $term; exec $term; \
workspace number 2; layout tabbed; exec firefox; \ workspace number 2; layout tabbed; exec firefox; \
workspace number 3; exec spotify; \ workspace number 3; exec spotify; \
workspace number 1" workspace number 1"

15
ws-emacs.json Normal file
View file

@ -0,0 +1,15 @@
{
"layout": "splith",
"percent": 1,
"nodes": [
{"swallows": [{"class": "^Emacs$"}], "percent": 0.62},
{
"layout": "splitv",
"percent": 0.38,
"nodes": [
{"swallows": [{"class": "^Vbeterm$"}]},
{"swallows": [{"class": "^Vbeterm$"}]}
]
}
]
}