Skip to content

Commit

Permalink
sddm background
Browse files Browse the repository at this point in the history
  • Loading branch information
leo60228 committed Nov 11, 2024
1 parent ca15c0f commit 5c9b2a4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/kde.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ lib.makeComponent "kde" (
# Enable the KDE Desktop Environment.
services.displayManager.sddm.enable = true;
services.displayManager.sddm.enableHidpi = true;
services.displayManager.sddm.theme = "breeze-user";

environment.sessionVariables.NIXOS_OZONE_WL = "1";
environment.sessionVariables.MOZ_DISABLE_RDD_SANDBOX = "1";
Expand All @@ -49,6 +50,7 @@ lib.makeComponent "kde" (
(flakes.rom-properties.packages.${pkgs.system}.rp_kde6.overrideAttrs (oldAttrs: {
patches = oldAttrs.patches ++ [ ../files/rp_larger_icons.diff ];
}))
pkgs.leoPkgs.sddm-theme-breeze-user
];

services.desktopManager.plasma6.enable = true;
Expand Down
2 changes: 2 additions & 0 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
python3,
libsForQt5,
qt6,
kdePackages,
}:

rec {
Expand All @@ -23,6 +24,7 @@ rec {
redumper = callPackage ./redumper { };
reposilite = callPackage ./reposilite { };
rust = callPackage ./rust { };
sddm-theme-breeze-user = kdePackages.callPackage ./sddm-theme-breeze-user { };
twemoji-ttf = callPackage ./twemoji-ttf { };
vscode-fhs = callPackage ./vscode-fhs { };
vxis-capture-fw-mod = callPackage ./vxis-capture-fw-mod { };
Expand Down
14 changes: 14 additions & 0 deletions pkgs/sddm-theme-breeze-user/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{ runCommandNoCC, plasma-desktop }:

runCommandNoCC "sddm-theme-breeze-user" { } ''
mkdir -p $out/share/sddm/themes
cp -r ${plasma-desktop}/share/sddm/themes/breeze $out/share/sddm/themes/breeze-user
chmod -R u+w $out
sed -i -z '/WallpaperFader {[^}]*}/,''${s///;b};$q1' $out/share/sddm/themes/breeze-user/Main.qml
substituteInPlace $out/share/sddm/themes/breeze-user/Background.qml --replace-fail 'fillMode: Image.PreserveAspectCrop' 'fillMode: Image.PreserveAspectCrop; horizontalAlignment: Image.AlignLeft'
substituteInPlace $out/share/sddm/themes/breeze-user/metadata.desktop --replace-fail 'Name=Breeze' 'Name=Breeze (user)' --replace-fail 'Theme-Id=breeze' 'Theme-Id=breeze-user'
cat > $out/share/sddm/themes/breeze-user/theme.conf.user << EOF
[General]
background = ${./my_burden_is_light.png}
EOF
''
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5c9b2a4

Please sign in to comment.