diff --git a/modules/apps/okular.nix b/modules/apps/okular.nix index ebf1ecf8..e2307205 100644 --- a/modules/apps/okular.nix +++ b/modules/apps/okular.nix @@ -154,7 +154,7 @@ with lib.types; # Change to black & white colors (see options below) "BlackWhite" # Invert lightness but leave hue and saturation - "InvertLightness" + "InvertLightness" # Like InvertLightness, but slightly more contrast "InvertLumaSymmetric" # Like InvertLightness, but much more contrast diff --git a/modules/kwin.nix b/modules/kwin.nix index 42a93998..a2016f38 100644 --- a/modules/kwin.nix +++ b/modules/kwin.nix @@ -56,10 +56,13 @@ let names: builtins.listToAttrs (lib.imap1 (i: v: (lib.nameValuePair "Name_${builtins.toString i}" v)) names); - virtualDesktopIdAttrs = number: - builtins.listToAttrs (map (i: (lib.nameValuePair "Id_${builtins.toString i}" "Desktop_${builtins.toString i}")) (lib.range 1 number)); + builtins.listToAttrs ( + map (i: (lib.nameValuePair "Id_${builtins.toString i}" "Desktop_${builtins.toString i}")) ( + lib.range 1 number + ) + ); capitalizeWord = word: diff --git a/modules/widgets/icon-tasks.nix b/modules/widgets/icon-tasks.nix index bdb342bd..ae12f288 100644 --- a/modules/widgets/icon-tasks.nix +++ b/modules/widgets/icon-tasks.nix @@ -244,9 +244,7 @@ in ... }: { - name = if iconsOnly - then "org.kde.plasma.icontasks" - else "org.kde.plasma.taskmanager"; + name = if iconsOnly then "org.kde.plasma.icontasks" else "org.kde.plasma.taskmanager"; config = lib.recursiveUpdate { General = lib.filterAttrs (_: v: v != null) { launchers = launchers; diff --git a/modules/widgets/plasmusic-toolbar.nix b/modules/widgets/plasmusic-toolbar.nix index 304f2333..5f7413d6 100644 --- a/modules/widgets/plasmusic-toolbar.nix +++ b/modules/widgets/plasmusic-toolbar.nix @@ -263,9 +263,7 @@ in if source == null then { } else if source == "auto" then - { - choosePlayerAutomatically = true; - } + { choosePlayerAutomatically = true; } else { choosePlayerAutomatically = false; diff --git a/modules/workspace.nix b/modules/workspace.nix index 761b89ee..70708042 100644 --- a/modules/workspace.nix +++ b/modules/workspace.nix @@ -34,6 +34,26 @@ let }; }; + wallpaperBackgroundType = lib.types.submodule ( + { config, ... }: + { + options = { + color = lib.mkOption { + type = with lib.types; nullOr str; + default = null; + example = "219,99,99"; + description = "Background color to use"; + }; + blur = lib.mkOption { + type = with lib.types; nullOr bool; + default = null; + example = true; + description = "Whether to blur the background"; + }; + }; + } + ); + anyThemeSet = ( cfg.workspace.theme != null || cfg.workspace.colorScheme != null @@ -191,6 +211,15 @@ in ''; }; + wallpaperBackground = lib.mkOption { + type = lib.types.nullOr wallpaperBackgroundType; + default = null; + example = { + blur = true; + }; + description = "How to handle wallpaper background when there is empty space."; + }; + soundTheme = lib.mkOption { type = with lib.types; nullOr str; default = null; @@ -282,6 +311,15 @@ in plasma.workspace.windowDecorations.theme or none. ''; } + { + assertion = ( + cfg.workspace.wallpaperBackground == null + || ( + cfg.workspace.wallpaperBackground.blur == null || cfg.workspace.wallpaperBackground.color == null + ) + ); + message = "programs.plasma.wallpaperBackground can only have a color or be blurred."; + } ]; warnings = ( if @@ -448,6 +486,20 @@ in toString wallpaperFillModeTypes.${cfg.workspace.wallpaperFillMode} }");'' } + ${ + lib.optionalString (cfg.workspace.wallpaperBackground != null) + ''desktop.writeConfig("${ + if (cfg.workspace.wallpaperBackground ? blur && cfg.workspace.wallpaperBackground.blur != null) then + "Blur" + else + "Color" + }", "${ + if cfg.workspace.wallpaperBackground ? blur && cfg.workspace.wallpaperBackground.blur != null then + lib.boolToString cfg.workspace.wallpaperBackground.blur + else + cfg.workspace.wallpaperBackground.color + }");'' + } } ''; priority = 3; @@ -493,6 +545,20 @@ in toString wallpaperFillModeTypes.${cfg.workspace.wallpaperFillMode} }");'' } + ${ + lib.optionalString (cfg.workspace.wallpaperBackground != null) + ''desktop.writeConfig("${ + if (cfg.workspace.wallpaperBackground ? blur && cfg.workspace.wallpaperBackground.blur != null) then + "Blur" + else + "Color" + }", "${ + if cfg.workspace.wallpaperBackground ? blur && cfg.workspace.wallpaperBackground.blur != null then + lib.boolToString cfg.workspace.wallpaperBackground.blur + else + cfg.workspace.wallpaperBackground.color + }");'' + } } ''; priority = 3;