treewide: use xdg.autostart.entries for autostart files (#2218)

Link: https://github.com/nix-community/stylix/pull/2218
Closes: https://github.com/nix-community/stylix/issues/2287

Reviewed-by: 0xda157 <da157@voidq.com>
This commit is contained in:
jamie 2026-04-30 21:06:47 +01:00 committed by GitHub
parent 0bd266569c
commit cbe360bb83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 13 deletions

View file

@ -137,12 +137,17 @@ mkTarget {
};
# Enable the extension after logging in.
configFile."autostart/stylix-activate-gnome.desktop".text = ''
[Desktop Entry]
Type=Application
Exec=${lib.getExe activator} enable
Name=Stylix: enable User Themes extension for GNOME Shell
'';
autostart = {
enable = true;
entries = lib.singleton (
pkgs.makeDesktopItem {
name = "stylix-activate-gnome";
desktopName = "Stylix: enable User Themes extension for GNOME Shell";
exec = "${lib.getExe activator} enable";
}
+ /share/applications/stylix-activate-gnome.desktop
);
};
};
}
)

View file

@ -438,13 +438,18 @@ in
# This desktop entry will run the theme activator when a new Plasma session is started
# Note: This doesn't run again if a new homeConfiguration is activated from a running Plasma session
configFile."autostart/stylix-activate-kde.desktop".text = ''
[Desktop Entry]
Type=Application
Exec=${activator}
Name=Stylix: activate KDE theme
X-KDE-AutostartScript=true
'';
autostart = {
enable = true;
entries = lib.singleton (
pkgs.makeDesktopItem {
name = "stylix-activate-kde";
desktopName = "Stylix: activate KDE theme";
exec = activator;
extraConfig.X-KDE-AutostartScript = "true";
}
+ /share/applications/stylix-activate-kde.desktop
);
};
};
};
}