fixed GetWM

This commit is contained in:
exhq 2023-02-12 16:54:51 +03:30
parent 3ed2a91cbc
commit f4bd0f0318

View file

@ -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() {
}