mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-07 14:08:29 -04:00
add(systemd): dms-tray-watcher service & commands for early tray registration
This commit is contained in:
@@ -101,6 +101,24 @@ in
|
||||
Install.WantedBy = [ cfg.systemd.target ];
|
||||
};
|
||||
|
||||
# Early SNI watcher so autostart tray apps register before the shell loads.
|
||||
systemd.user.services.dms-tray-watcher = lib.mkIf cfg.systemd.enable {
|
||||
Unit = {
|
||||
Description = "DMS Status Notifier Watcher (early tray)";
|
||||
PartOf = [ cfg.systemd.target ];
|
||||
Before = [ cfg.systemd.target ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "dbus";
|
||||
BusName = "org.kde.StatusNotifierWatcher";
|
||||
ExecStart = lib.getExe cfg.package + " tray-watcher";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
|
||||
Install.WantedBy = [ cfg.systemd.target ];
|
||||
};
|
||||
|
||||
xdg.stateFile."DankMaterialShell/session.json" = lib.mkIf (cfg.session != { }) {
|
||||
source = jsonFormat.generate "session.json" cfg.session;
|
||||
};
|
||||
|
||||
@@ -39,6 +39,24 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# Early SNI watcher so autostart tray apps register before the shell loads.
|
||||
systemd.user.services.dms-tray-watcher = lib.mkIf cfg.systemd.enable {
|
||||
description = "DMS Status Notifier Watcher (early tray)";
|
||||
path = lib.mkForce [ ];
|
||||
|
||||
partOf = [ cfg.systemd.target ];
|
||||
before = [ cfg.systemd.target ];
|
||||
wantedBy = [ cfg.systemd.target ];
|
||||
restartIfChanged = cfg.systemd.restartIfChanged;
|
||||
|
||||
serviceConfig = {
|
||||
Type = "dbus";
|
||||
BusName = "org.kde.StatusNotifierWatcher";
|
||||
ExecStart = lib.getExe cfg.package + " tray-watcher";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [ cfg.quickshell.package ] ++ common.packages;
|
||||
|
||||
environment.etc = lib.mapAttrs' (name: value: {
|
||||
|
||||
Reference in New Issue
Block a user