Created
May 7, 2023 18:10
-
-
Save marcusramberg/b467b4d4513cb5da7c10e6d34c00741f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/nimdow.nim b/src/nimdow.nim | |
index 162acf6..9e2acdd 100644 | |
--- a/src/nimdow.nim | |
+++ b/src/nimdow.nim | |
@@ -55,6 +55,16 @@ when isMainModule: | |
except: | |
log getCurrentExceptionMsg(), lvlError | |
+ logger.enabled = loadedConfig.loggingEnabled | |
+ | |
+ log "Starting Nimdow " & version | |
+ | |
+ try: | |
+ loadedConfig.runAutostartCommands(configTable) | |
+ loadedConfig.populateAppRules(configTable) | |
+ except: | |
+ log getCurrentExceptionMsg(), lvlError | |
+ | |
let nimdow = newWindowManager(eventManager, loadedConfig, configTable) | |
addExitProc(proc() = | |
@@ -63,16 +73,6 @@ when isMainModule: | |
discard tryRemoveFile(ipc.socketLoc) | |
) | |
- logger.enabled = loadedConfig.loggingEnabled | |
- | |
- log "Starting Nimdow " & version | |
- | |
- try: | |
- loadedConfig.populateAppRules(configTable) | |
- loadedConfig.runAutostartCommands(configTable) | |
- except: | |
- log getCurrentExceptionMsg(), lvlError | |
- | |
let | |
selector = newSelector[pointer]() | |
displayFd = ConnectionNumber(nimdow.display).int | |
@@ -107,4 +107,3 @@ when isMainModule: | |
discard XNextEvent(nimdow.display, xEvent.addr) | |
eventManager.dispatchEvent(xEvent) | |
eventManager.checkForProcessesToClose() | |
- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment