Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcusramberg/b467b4d4513cb5da7c10e6d34c00741f to your computer and use it in GitHub Desktop.
Save marcusramberg/b467b4d4513cb5da7c10e6d34c00741f to your computer and use it in GitHub Desktop.
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