1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

dankinstall: remove systemd path for Hyprland

This commit is contained in:
bbedward
2025-12-08 19:48:07 -05:00
parent f406a977e0
commit 0435a805c7
10 changed files with 54 additions and 20 deletions

View File

@@ -563,7 +563,11 @@ func (b *BaseDistribution) DetectTerminalFromDeps(dependencies []deps.Dependency
return deps.TerminalGhostty
}
func (b *BaseDistribution) WriteEnvironmentConfig(terminal deps.Terminal) error {
func (b *BaseDistribution) WriteEnvironmentConfig(terminal deps.Terminal, wm deps.WindowManager) error {
if wm == deps.WindowManagerHyprland {
return nil
}
homeDir, err := os.UserHomeDir()
if err != nil {
return fmt.Errorf("failed to get home directory: %w", err)
@@ -602,12 +606,25 @@ TERMINAL=%s
return nil
}
func (b *BaseDistribution) EnableDMSService(ctx context.Context) error {
func (b *BaseDistribution) EnableDMSService(ctx context.Context, wm deps.WindowManager) error {
if wm == deps.WindowManagerHyprland {
return nil
}
cmd := exec.CommandContext(ctx, "systemctl", "--user", "enable", "--now", "dms")
if err := cmd.Run(); err != nil {
return fmt.Errorf("failed to enable dms service: %w", err)
}
b.log("Enabled dms systemd user service")
if wm == deps.WindowManagerNiri {
addWantsCmd := exec.CommandContext(ctx, "systemctl", "--user", "add-wants", "niri.service", "dms")
if err := addWantsCmd.Run(); err != nil {
return fmt.Errorf("failed to add dms as niri.service want: %w", err)
}
b.log("Added dms as niri.service want")
}
return nil
}