Fix and improve automatic i3 layout

This commit is contained in:
Elnu 2023-01-25 15:29:59 -08:00
parent bf0cd92f70
commit dd04c9bdb5
2 changed files with 16 additions and 2 deletions

View file

@ -1,10 +1,14 @@
{ ... }:
{ pkgs, ... }:
{
xsession.windowManager.i3.config = {
startup = [
{
command = ''i3-msg workspace 1 && (firefox &) && i3-msg "workspace 2; append_layout ${./tree.json}; open" && (for i in {1..4}; do i3-msg move left; done) && (discord &) && firefox --new-window https://youtube.com && i3-msg workspace 1'';
command = let layout = pkgs.substituteAll {
src = ./layout.sh;
tree = ./tree.json;
isExecutable = true;
}; in "${layout}";
always = true;
notification = false;
}

View file

@ -0,0 +1,10 @@
i3-msg workspace 1
firefox &
i3-msg "workspace 2; append_layout @tree@; open"
for i in {1..4}; do
i3-msg move left
done
discord
firefox --new-window https://youtube.com
i3-msg workspace 1