feat(cLib): fixing resolving only one monitor
This commit is contained in:
@@ -10,9 +10,22 @@ lib: {
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
@@ -112,19 +112,21 @@
|
||||
"hyprland/workspaces": {
|
||||
"active-only": false,
|
||||
"all-outputs": false,
|
||||
"disable-scroll": true,
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"active": "",
|
||||
"default": "",
|
||||
"empty": "",
|
||||
"persistent": ""
|
||||
"urgent": "",
|
||||
"active": "",
|
||||
"visible": "",
|
||||
"default": "",
|
||||
"empty": ""
|
||||
},
|
||||
"on-click": "activate",
|
||||
"show-special": false,
|
||||
"on-scroll-up": "hyprctl dispatch workspace r-1",
|
||||
"on-scroll-down": "hyprctl dispatch workspace r+1",
|
||||
"persistent-workspaces": {
|
||||
"*": 3
|
||||
},
|
||||
"rotate": 0
|
||||
}
|
||||
},
|
||||
"memory": {
|
||||
"format": "<span foreground='#928374'></span> {}%",
|
||||
|
||||
@@ -55,7 +55,7 @@ in
|
||||
splash_offset = 2.0;
|
||||
|
||||
preload = bgs.all;
|
||||
wallpaper = wallpapers;
|
||||
wallpaper = bgs.resolveList monitorMappings;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@ in
|
||||
};
|
||||
homepage.description = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Continuous file synchronization program.";
|
||||
default = "Continuous file synchronization program";
|
||||
};
|
||||
homepage.icon = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
|
||||
Reference in New Issue
Block a user