Set up autostart layout for i3
This commit is contained in:
parent
bb9afe7a51
commit
f48fa5a9cb
4 changed files with 40 additions and 15 deletions
|
@ -1,5 +1,5 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (import ./i3.nix) ];
|
imports = [ (import ./i3) ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
xsession.windowManager.i3.config.workspaceOutputAssign = [
|
|
||||||
{
|
|
||||||
output = "HDMI-0";
|
|
||||||
workspace = "1";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
output = "DVI-D-0";
|
|
||||||
workspace = "2";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
23
hosts/desktop/i3/default.nix
Normal file
23
hosts/desktop/i3/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
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'';
|
||||||
|
always = true;
|
||||||
|
notification = false;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
workspaceOutputAssign = [
|
||||||
|
{
|
||||||
|
output = "HDMI-0";
|
||||||
|
workspace = "1";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
output = "DVI-D-0";
|
||||||
|
workspace = "2";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
16
hosts/desktop/i3/tree.json
Normal file
16
hosts/desktop/i3/tree.json
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
// vim:ts=4:sw=4:et
|
||||||
|
{
|
||||||
|
"layout": "splitv",
|
||||||
|
"type": "con",
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"swallows": [{ "class": "^firefox$" }],
|
||||||
|
"type": "con"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"swallows": [{ "class": "^discord$" }],
|
||||||
|
"type": "con"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue