feat(cLib): fixing resolving only one monitor
This commit is contained in:
@@ -10,9 +10,22 @@ lib: {
|
|||||||
|
|
||||||
list = builtins.attrNames files;
|
list = builtins.attrNames files;
|
||||||
|
|
||||||
resolve = name: if name == null then null else files.${name};
|
resolve =
|
||||||
|
name:
|
||||||
|
if name == null then
|
||||||
|
null
|
||||||
|
else if files ? ${name} then
|
||||||
|
files.${name}
|
||||||
|
else
|
||||||
|
null;
|
||||||
|
|
||||||
resolveList = names: builtins.filter (x: x != null) (map resolve names);
|
safe = val: val != null;
|
||||||
|
|
||||||
|
resolveList =
|
||||||
|
mappings:
|
||||||
|
builtins.filter safe (
|
||||||
|
map (m: if m.bg == null then null else "${m.monitor},${resolve m.bg}") mappings
|
||||||
|
);
|
||||||
|
|
||||||
all = builtins.attrValues files;
|
all = builtins.attrValues files;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -112,19 +112,21 @@
|
|||||||
"hyprland/workspaces": {
|
"hyprland/workspaces": {
|
||||||
"active-only": false,
|
"active-only": false,
|
||||||
"all-outputs": false,
|
"all-outputs": false,
|
||||||
"disable-scroll": true,
|
|
||||||
"format": "{icon}",
|
"format": "{icon}",
|
||||||
"format-icons": {
|
"format-icons": {
|
||||||
"active": "",
|
"urgent": "",
|
||||||
"default": "",
|
"active": "",
|
||||||
"empty": "",
|
"visible": "",
|
||||||
"persistent": ""
|
"default": "",
|
||||||
|
"empty": ""
|
||||||
},
|
},
|
||||||
"on-click": "activate",
|
"on-click": "activate",
|
||||||
|
"show-special": false,
|
||||||
|
"on-scroll-up": "hyprctl dispatch workspace r-1",
|
||||||
|
"on-scroll-down": "hyprctl dispatch workspace r+1",
|
||||||
"persistent-workspaces": {
|
"persistent-workspaces": {
|
||||||
"*": 3
|
"*": 3
|
||||||
},
|
}
|
||||||
"rotate": 0
|
|
||||||
},
|
},
|
||||||
"memory": {
|
"memory": {
|
||||||
"format": "<span foreground='#928374'></span> {}%",
|
"format": "<span foreground='#928374'></span> {}%",
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ in
|
|||||||
splash_offset = 2.0;
|
splash_offset = 2.0;
|
||||||
|
|
||||||
preload = bgs.all;
|
preload = bgs.all;
|
||||||
wallpaper = wallpapers;
|
wallpaper = bgs.resolveList monitorMappings;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ in
|
|||||||
};
|
};
|
||||||
homepage.description = lib.mkOption {
|
homepage.description = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "Continuous file synchronization program.";
|
default = "Continuous file synchronization program";
|
||||||
};
|
};
|
||||||
homepage.icon = lib.mkOption {
|
homepage.icon = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
|||||||
Reference in New Issue
Block a user