kde: add applicationStyle and widgetStyle options (#2018)

Closes: https://github.com/nix-community/stylix/issues/2017
Link: https://github.com/nix-community/stylix/pull/2018

Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: Ian Ressa <ianressa@umich.edu>
This commit is contained in:
Andre 2026-01-30 05:57:45 -08:00 committed by GitHub
parent 861c3c92a9
commit f77ee4f3dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 32 additions and 3 deletions

View file

@ -176,10 +176,10 @@ let
mergeWithImage
{
kwinrc."org.kde.kdecoration2".library = cfg.decorations;
plasmarc.Theme.name = "default";
plasmarc.Theme.name = cfg.applicationStyle;
kdeglobals = {
KDE.widgetStyle = "Breeze";
KDE.widgetStyle = cfg.widgetStyle;
General.ColorScheme = colorschemeSlug;
};
}
@ -355,6 +355,21 @@ in
imperatively applying the window decoration via the System Settings app.
'';
};
widgetStyle = lib.mkOption {
type = lib.types.str;
default = "Breeze";
description = ''
The library for the widgets styles.
Widget styles other than default `Breeze` may not be compatible with
stylix.
'';
};
applicationStyle = lib.mkOption {
type = lib.types.str;
default = "default";
description = "The library for the application style.";
};
};
config =

View file

@ -1,7 +1,21 @@
{ lib, ... }:
{ lib, pkgs, ... }:
{
config = {
stylix.testbed.ui.graphicalEnvironment = "kde";
services.displayManager.autoLogin.enable = lib.mkForce false;
home-manager.sharedModules = lib.singleton {
stylix.targets.kde = {
enable = true;
applicationStyle = "Utterly-Round";
widgetStyle = "Darkly";
};
home.packages = with pkgs; [
darkly
darkly-qt5
utterly-round-plasma-style
];
};
};
}