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:
@@ -774,5 +774,6 @@ func getCommonCommands() []*cobra.Command {
|
||||
trashCmd,
|
||||
systemCmd,
|
||||
switchUserCmd,
|
||||
trayWatcherCmd,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user