layout-switcher-package/sharedModule.nim

12 lines
483 B
Nim
Raw Normal View History

2023-12-25 07:52:09 +00:00
from std/osproc import startProcess, ProcessOption, waitForExit, close
2024-01-01 14:41:17 +00:00
from std/os import fileExists
2023-12-25 07:52:09 +00:00
proc runCommand*(command: string, args: openArray[string]): int =
## This will run a command with the given args and return its exit code upon completion
let process = startProcess(command, args=args, options={poParentStreams})
result = process.waitForExit()
process.close()
proc isGlobalMenuEnabled*(): bool =
2024-01-01 14:41:17 +00:00
return fileExists("/usr/lib/vala-panel/appmenu-registrar")