From f4bd0f031805de23f9050944ce2af6d725ceef12 Mon Sep 17 00:00:00 2001 From: exhq Date: Sun, 12 Feb 2023 16:54:51 +0330 Subject: [PATCH] fixed GetWM --- data/data.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/data/data.go b/data/data.go index 5a502e7..052170a 100644 --- a/data/data.go +++ b/data/data.go @@ -158,7 +158,10 @@ func GetShell() string { return os.Getenv("SHELL") } func GetWM() string { - return os.Getenv("XDG_CURRENT_DESKTOP") + cmd := exec.Command("wmctrl", "-m") + shell, _ := cmd.Output() + line := strings.Split(string(shell), "\n")[0] + return strings.ReplaceAll(line, "Name: ", "") } func getPackages() { }