feat(i3): load workspace layouts at startup

main
mandlm 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 ./i3status-rust.nix
]; ];
home.file.workspaces = {
source = ./workspaces;
target = ".config/i3/workspaces";
recursive = true;
};
xsession.windowManager.i3 = { xsession.windowManager.i3 = {
enable = true; enable = true;
config = { config = {
modifier = "Mod4"; modifier = "Mod4";
terminal = "${pkgs.kitty}/bin/kitty"; terminal = "${pkgs.kitty}/bin/kitty";
@ -42,13 +49,24 @@
defaultWorkspace = "workspace number 1"; defaultWorkspace = "workspace number 1";
startup = [ startup = [
{ command = "${pkgs.kitty}/bin/kitty"; } { command = "i3-msg 'workspace 1; append_layout ~/.config/i3/workspaces/workspace-1.json'"; }
{ command = "${pkgs.firefox}/bin/firefox"; } { 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 = { assigns = {
"1" = [{ class = "^kitty$"; }]; "6" = [{ class = "^zoom$"; }];
"5" = [{ class = "^firefox$"; }];
}; };
}; };
}; };

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"
}