devicescale: Bug fix: need to parse XDG_CURRENT_DESKTOP for GNOME classic

This commit is contained in:
Hajime Hoshi 2018-01-04 00:55:32 +09:00
parent 70f9fee8af
commit 738d23cf51

View File

@ -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":