feat: sort workspaces

This commit is contained in:
Patrick 2023-09-27 13:41:10 +02:00
parent 5b153ca98f
commit 31e6ab807b
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F

View file

@ -27,7 +27,7 @@ let
{
mode = "dock";
workspaceButtons = true;
workspaceNumbers = true;
workspaceNumbers = false;
statusCommand = "${config.programs.i3status-rust.package}/bin/i3status-rs config-main.toml";
trayOutput = "primary";
}
@ -35,8 +35,8 @@ let
workspaceOutputAssign = let
output = out:
map (x: {
workspace = x;
lib.lists.imap1 (i: x: {
workspace = "${toString i}:${x}";
output = out;
});
in
@ -53,10 +53,12 @@ let
or {};
keybindings =
(lib.attrsets.mergeAttrsList (map (x: {
"${modifier}+${x.workspace}" = "workspace ${x.workspace}";
"${modifier}+Shift+${x.workspace}" = "move container to workspace ${x.workspace}";
})
(lib.attrsets.mergeAttrsList (map (x: (let
key = lib.elemAt (lib.strings.splitString ":" x.workspace) 1;
in {
"${modifier}+${key}" = "workspace ${x.workspace}";
"${modifier}+Shift+${key}" = "move container to workspace ${x.workspace}";
}))
cfg.workspaceOutputAssign))
// {
"${modifier}+t" = "exec ${terminal}";