diff options
| -rw-r--r-- | DomeKey/main.m | 23 | 
1 files changed, 12 insertions, 11 deletions
| diff --git a/DomeKey/main.m b/DomeKey/main.m index 06db5aa..4eff03d 100644 --- a/DomeKey/main.m +++ b/DomeKey/main.m @@ -17,20 +17,21 @@ int main(int argc, const char * argv[]) {      if (config->args.reload) {          [Mappings dispatchReload]; -        return 0; // TODO: Return result of `notify_post`, and still log -    } - -    @autoreleasepool { -        [NSApplication sharedApplication]; -        AppDelegate *app = [[AppDelegate alloc] init]; -        [NSApp setDelegate:app]; +        // TODO: Return result of `notify_post`, and still log +    } else if (config->args.daemon) { +        @autoreleasepool { +            [NSApplication sharedApplication]; +            AppDelegate *app = [[AppDelegate alloc] init]; +            [NSApp setDelegate:app]; -        // insert code here... -        NSLog(@"Hello, World!"); +            // insert code here... +            NSLog(@"Hello, World!"); -        [Mappings observeReloadNotification]; +            [Mappings observeReloadNotification]; -        [NSApp run]; +            [NSApp run]; +        }      } +      return 0;  } | 
