diff --git a/Makefile b/Makefile index 904b5ec..2758ea3 100644 --- a/Makefile +++ b/Makefile @@ -20,4 +20,5 @@ uninstall: rm /usr/bin/nwg-drawer run: - go run *.go + go build -o bin/nwg-drawer *.go + bin/nwg-drawer diff --git a/bin/nwg-drawer b/bin/nwg-drawer index d4f171b..6d5ccee 100755 Binary files a/bin/nwg-drawer and b/bin/nwg-drawer differ diff --git a/main.go b/main.go index 088a2bf..f981dbb 100644 --- a/main.go +++ b/main.go @@ -101,7 +101,9 @@ var ( func defaultStringIfBlank(s, fallback string) string { s = strings.TrimSpace(s) - if s == "" { + // os.Getenv("TERM") returns "linux" instead of empty string, if program has been started + // from a key binding defined in the config file. See #23. + if s == "" || s == "linux" { return fallback } return s diff --git a/tools.go b/tools.go index f936241..7726356 100644 --- a/tools.go +++ b/tools.go @@ -366,7 +366,8 @@ func parseDesktopFiles(desktopFiles []string) string { if entry.NoDisplay { hidden++ - continue + // We still need hidden entries, so `continue` is disallowed here + // Fixes introduced in #19 } id2entry[entry.DesktopID] = entry