From cc4a6a5899eb99c27566e6db28ba2c3cbc87d679 Mon Sep 17 00:00:00 2001 From: bbedward Date: Fri, 16 Jan 2026 09:24:54 -0500 Subject: [PATCH] doctor: add mango and labwc to compositors fixes #1394 --- core/cmd/dms/commands_doctor.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/cmd/dms/commands_doctor.go b/core/cmd/dms/commands_doctor.go index 0ddce39c..72ee4587 100644 --- a/core/cmd/dms/commands_doctor.go +++ b/core/cmd/dms/commands_doctor.go @@ -87,6 +87,8 @@ var ( swayVersionRegex = regexp.MustCompile(`sway version (\d+\.\d+)`) riverVersionRegex = regexp.MustCompile(`river (\d+\.\d+)`) wayfireVersionRegex = regexp.MustCompile(`wayfire (\d+\.\d+)`) + labwcVersionRegex = regexp.MustCompile(`labwc (\d+\.\d+\.\d+)`) + mangowcVersionRegex = regexp.MustCompile(`mango (\d+\.\d+\.\d+)`) ) var doctorCmd = &cobra.Command{ @@ -448,11 +450,13 @@ func checkWindowManagers() []checkResult { versionRegex *regexp.Regexp commands []string }{ - {"Hyprland", "hyprctl", "version", hyprlandVersionRegex, []string{"hyprland", "Hyprland"}}, + {"Hyprland", "Hyprland", "--version", hyprlandVersionRegex, []string{"hyprland", "Hyprland"}}, {"niri", "niri", "--version", niriVersionRegex, []string{"niri"}}, {"Sway", "sway", "--version", swayVersionRegex, []string{"sway"}}, {"River", "river", "-version", riverVersionRegex, []string{"river"}}, {"Wayfire", "wayfire", "--version", wayfireVersionRegex, []string{"wayfire"}}, + {"labwc", "labwc", "--version", labwcVersionRegex, []string{"labwc"}}, + {"mangowc", "mango", "-v", mangowcVersionRegex, []string{"mango"}}, } var results []checkResult @@ -498,8 +502,8 @@ func checkWindowManagers() []checkResult { } func getVersionFromCommand(cmd, arg string, regex *regexp.Regexp) string { - output, err := exec.Command(cmd, arg).Output() - if err != nil { + output, err := exec.Command(cmd, arg).CombinedOutput() + if err != nil && len(output) == 0 { return "installed" }