Nix/Hyprland on HM: fix nix loop for workspaces (#764)

This commit is contained in:
Hadi 2024-08-29 21:00:18 +02:00 committed by GitHub
parent f169251416
commit 3746d2fa67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -141,19 +141,15 @@ Here is an example config:
] ]
++ ( ++ (
# workspaces # workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10} # binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
builtins.concatLists (builtins.genList ( builtins.concatLists (builtins.genList (i:
x: let let ws = i + 1;
ws = let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [ in [
"$mod, ${ws}, workspace, ${toString (x + 1)}" "$mod, code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" "$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
] ]
) )
10) 9)
); );
}; };
} }