diff --git a/internal/devicescale/devicescale_unix.go b/internal/devicescale/devicescale_unix.go index 32441f8af..15e702d77 100644 --- a/internal/devicescale/devicescale_unix.go +++ b/internal/devicescale/devicescale_unix.go @@ -23,6 +23,7 @@ import ( "os/exec" "regexp" "strconv" + "strings" ) type windowManager int @@ -34,7 +35,8 @@ const ( ) func currentWindowManager() windowManager { - switch os.Getenv("XDG_CURRENT_DESKTOP") { + tokens := strings.Split(os.Getenv("XDG_CURRENT_DESKTOP"), ":") + switch tokens[len(tokens)-1] { case "GNOME": return windowManagerGnome case "X-Cinnamon":