feat: bind workspace to monitors
This commit is contained in:
parent
71093e1c0f
commit
8c498d10ec
3 changed files with 20 additions and 0 deletions
13
home/user/hypr/workspace.nix
Normal file
13
home/user/hypr/workspace.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ monitors }:
|
||||
let
|
||||
monitorNum = builtins.length monitors;
|
||||
workspaceNum = 10;
|
||||
workspaceList = builtins.genList (
|
||||
index:
|
||||
let
|
||||
currentNum = index - (monitorNum * (index / monitorNum));
|
||||
in
|
||||
"${builtins.toString (index + 1)}, monitor:${builtins.elemAt monitors currentNum}"
|
||||
) workspaceNum;
|
||||
in
|
||||
if (monitorNum > 0) then workspaceList else [ ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue