feat(i3): load workspace layouts at startup

This commit is contained in:
Michael Mandl 2022-06-28 17:05:14 +02:00
parent a7e8d14391
commit 8935eeac4b
Signed by: mandlm
GPG key ID: 4AA25D647AA54CC7
5 changed files with 88 additions and 4 deletions

View file

@ -5,8 +5,15 @@
./i3status-rust.nix
];
home.file.workspaces = {
source = ./workspaces;
target = ".config/i3/workspaces";
recursive = true;
};
xsession.windowManager.i3 = {
enable = true;
config = {
modifier = "Mod4";
terminal = "${pkgs.kitty}/bin/kitty";
@ -42,13 +49,24 @@
defaultWorkspace = "workspace number 1";
startup = [
{ command = "${pkgs.kitty}/bin/kitty"; }
{ command = "${pkgs.firefox}/bin/firefox"; }
{ command = "i3-msg 'workspace 1; append_layout ~/.config/i3/workspaces/workspace-1.json'"; }
{ command = "i3-msg 'workspace 2; append_layout ~/.config/i3/workspaces/workspace-2.json'"; }
{ command = "i3-msg 'workspace 4; append_layout ~/.config/i3/workspaces/workspace-4.json'"; }
{ command = "i3-msg 'workspace 5; append_layout ~/.config/i3/workspaces/workspace-5.json'"; }
{ command = "kitty"; notification = false; }
{ command = "firefox"; notification = false; }
# { command = "element-desktop"; notification = false; }
{ command = "keepassxc"; notification = false; }
{ command = "nextcloud"; notification = false; }
{ command = "signal-desktop"; notification = false; }
{ command = "slack"; notification = false; }
{ command = "telegram-desktop"; notification = false; }
{ command = "thunderbird"; notification = false; }
# { command = "zoom"; notification = false; }
];
assigns = {
"1" = [{ class = "^kitty$"; }];
"5" = [{ class = "^firefox$"; }];
"6" = [{ class = "^zoom$"; }];
};
};
};

View file

@ -0,0 +1,10 @@
// vim:ts=4:sw=4:et
{
"name": "Terminal",
"swallows": [
{
"class": "^kitty$"
}
],
"type": "con"
}

View file

@ -0,0 +1,36 @@
// vim:ts=4:sw=4:et
{
"layout": "tabbed",
"type": "con",
"nodes": [
{
"name": "Telegram",
"swallows": [
{
"class": "^TelegramDesktop$"
}
],
"type": "con"
},
{
"name": "Signal",
"swallows": [
{
"class": "^Signal$"
}
],
"type": "con"
}
]
}
{
"name": "Slack",
"swallows": [
{
"class": "^Slack$"
}
],
"type": "con"
}

View file

@ -0,0 +1,10 @@
// vim:ts=4:sw=4:et
{
"name": "Email",
"swallows": [
{
"class": "^Thunderbird$"
}
],
"type": "con"
}

View file

@ -0,0 +1,10 @@
// vim:ts=4:sw=4:et
{
"name": "Browser",
"swallows": [
{
"class": "^firefox$"
}
],
"type": "con"
}