1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-04 20:48:29 -04:00

add(systemd): dms-tray-watcher service & commands for early tray registration

This commit is contained in:
purian23
2026-07-06 14:52:36 -04:00
parent 405ea708b3
commit 3420d2be93
19 changed files with 320 additions and 5 deletions
+1
View File
@@ -774,5 +774,6 @@ func getCommonCommands() []*cobra.Command {
trashCmd,
systemCmd,
switchUserCmd,
trayWatcherCmd,
}
}
+24
View File
@@ -0,0 +1,24 @@
package main
import (
"github.com/AvengeMedia/DankMaterialShell/core/internal/log"
"github.com/AvengeMedia/DankMaterialShell/core/internal/traywatcher"
"github.com/spf13/cobra"
)
var trayWatcherCmd = &cobra.Command{
Use: "tray-watcher",
Short: "Run a minimal StatusNotifierWatcher for early tray registration",
Long: `Run a minimal org.kde.StatusNotifierWatcher daemon.
Started early in the session (Before=graphical-session.target via
dms-tray-watcher.service), it lets tray apps launched by XDG autostart
register their items before the shell finishes loading, and keeps them
registered across shell restarts. The shell's tray host picks items up from
this watcher; if it is not running, the shell's built-in watcher takes over.`,
Run: func(cmd *cobra.Command, args []string) {
if err := traywatcher.Run(); err != nil {
log.Fatalf("%v", err)
}
},
}