diff --git a/core/internal/dms/app.go b/core/internal/dms/app.go index 82f85e47..78e0c6f0 100644 --- a/core/internal/dms/app.go +++ b/core/internal/dms/app.go @@ -105,14 +105,19 @@ type MenuItem struct { func NewModel(version string) Model { detector, _ := NewDetector() - dependencies := detector.GetInstalledComponents() + var dependencies []DependencyInfo + var hyprlandInstalled, niriInstalled bool + var err error + if detector != nil { + dependencies = detector.GetInstalledComponents() - // Use the proper detection method for both window managers - hyprlandInstalled, niriInstalled, err := detector.GetWindowManagerStatus() - if err != nil { - // Fallback to false if detection fails - hyprlandInstalled = false - niriInstalled = false + // Use the proper detection method for both window managers + hyprlandInstalled, niriInstalled, err = detector.GetWindowManagerStatus() + if err != nil { + // Fallback to false if detection fails + hyprlandInstalled = false + niriInstalled = false + } } updateToggles := make(map[string]bool) diff --git a/core/internal/dms/views_common.go b/core/internal/dms/views_common.go index ff5d9e85..ccb5d945 100644 --- a/core/internal/dms/views_common.go +++ b/core/internal/dms/views_common.go @@ -109,6 +109,9 @@ func (m Model) renderAboutView() string { b.WriteString(normalStyle.Render("Components:")) b.WriteString("\n") + if len(m.dependencies) == 0 { + b.WriteString(normalStyle.Render("\n Component detection not supported on this platform.")) + } for _, dep := range m.dependencies { status := "✗" if dep.Status == 1 {