From 75779554d7eb417f62f25f4f2895de4b512ed101 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Mon, 5 Jul 2021 21:59:05 +0200 Subject: [PATCH] i3: use a saved layout to spawn Emacs workspace This works great! --- config | 2 +- ws-emacs.json | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 ws-emacs.json diff --git a/config b/config index 88fef0c..6169ab1 100644 --- a/config +++ b/config @@ -160,7 +160,7 @@ for_window [window_role="PictureInPicture"] floating enable # Start stuff exec_always --no-startup-id systemctl --user start --no-block i3-session.target 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 3; exec spotify; \ workspace number 1" diff --git a/ws-emacs.json b/ws-emacs.json new file mode 100644 index 0000000..a8baf53 --- /dev/null +++ b/ws-emacs.json @@ -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$"}]} + ] + } + ] +}