better-manage-global-menu #4

Merged
rokosun merged 8 commits from better-manage-global-menu into master 2024-01-01 15:38:54 +00:00
Showing only changes of commit 33d15f289d - Show all commits

View File

@ -1,4 +1,5 @@
from std/osproc import startProcess, ProcessOption, waitForExit, close
from std/os import fileExists
proc runCommand*(command: string, args: openArray[string]): int =
## This will run a command with the given args and return its exit code upon completion
@ -7,4 +8,4 @@ proc runCommand*(command: string, args: openArray[string]): int =
process.close()
proc isGlobalMenuEnabled*(): bool =
return runCommand("/usr/bin/pacman", ["-Qq", "vala-panel-appmenu-registrar"]) == 0
return fileExists("/usr/lib/vala-panel/appmenu-registrar")