Squash merge refactor into main
This commit is contained in:
parent
529c9e5fa7
commit
b82cd59f4f
35 changed files with 498 additions and 358 deletions
|
|
@ -1,14 +1,20 @@
|
|||
{ monitors }:
|
||||
let
|
||||
monitorNum = builtins.length monitors;
|
||||
inherit (builtins)
|
||||
length
|
||||
genList
|
||||
toString
|
||||
elemAt
|
||||
;
|
||||
monitorNum = length monitors;
|
||||
workspaceNum = 10;
|
||||
workspaceList = builtins.genList (
|
||||
workspaceList = genList (
|
||||
index:
|
||||
let
|
||||
currentNum = index - (monitorNum * (index / monitorNum));
|
||||
default = if index < monitorNum then "true" else "false";
|
||||
in
|
||||
"${builtins.toString (index + 1)}, monitor:${builtins.elemAt monitors currentNum}, default:${default}"
|
||||
"${toString (index + 1)}, monitor:${elemAt monitors currentNum}, default:${default}"
|
||||
) workspaceNum;
|
||||
in
|
||||
if (monitorNum > 0) then workspaceList else [ ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue