diff --git a/lib/theme/bgs.nix b/lib/theme/bgs.nix index c2ab4553..21591309 100644 --- a/lib/theme/bgs.nix +++ b/lib/theme/bgs.nix @@ -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; }; diff --git a/modules/home/programs/waybar/config/config.jsonc b/modules/home/programs/waybar/config/config.jsonc index 49867c4a..a1c5759f 100644 --- a/modules/home/programs/waybar/config/config.jsonc +++ b/modules/home/programs/waybar/config/config.jsonc @@ -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": " {}%", diff --git a/modules/home/services/hyprpaper/default.nix b/modules/home/services/hyprpaper/default.nix index d82ac3ec..e9690ea7 100644 --- a/modules/home/services/hyprpaper/default.nix +++ b/modules/home/services/hyprpaper/default.nix @@ -55,7 +55,7 @@ in splash_offset = 2.0; preload = bgs.all; - wallpaper = wallpapers; + wallpaper = bgs.resolveList monitorMappings; }; }; }; diff --git a/modules/server/syncthing/default.nix b/modules/server/syncthing/default.nix index 9b0aa66d..53544dda 100644 --- a/modules/server/syncthing/default.nix +++ b/modules/server/syncthing/default.nix @@ -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;