Update sharedModule.nim

This commit is contained in:
Rokosun 2024-01-01 14:41:17 +00:00
parent 666d24625b
commit 33d15f289d

View File

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