-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Launcher.app rewritten in objc, to cut the size of micSwitch.app by h…
…alves
- Loading branch information
Showing
9 changed files
with
108 additions
and
103 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// AppDelegate.h | ||
// Launcher | ||
// | ||
// Created by dstd on 17/11/2017. | ||
// Copyright © 2017 Denis Stanishevskiy. All rights reserved. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
|
||
@interface AppDelegate : NSObject <NSApplicationDelegate> | ||
@end | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// AppDelegate.m | ||
// Launcher | ||
// | ||
// Created by dstd on 17/11/2017. | ||
// Copyright © 2017 Denis Stanishevskiy. All rights reserved. | ||
// | ||
|
||
#import "AppDelegate.h" | ||
|
||
@implementation AppDelegate | ||
|
||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { | ||
NSString* mainApp = NSBundle.mainBundle.bundlePath | ||
.stringByDeletingLastPathComponent // Launcher | ||
.stringByDeletingLastPathComponent // LoginItems | ||
.stringByDeletingLastPathComponent // Library | ||
.stringByDeletingLastPathComponent;// Contents | ||
[[NSWorkspace sharedWorkspace] launchApplication:mainApp]; | ||
|
||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(10 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ | ||
[NSApp terminate:self]; | ||
}); | ||
} | ||
|
||
@end | ||
|
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13196" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct"> | ||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13529" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct"> | ||
<dependencies> | ||
<deployment identifier="macosx"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13196"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13529"/> | ||
</dependencies> | ||
<objects> | ||
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication"/> | ||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> | ||
<customObject id="-3" userLabel="Application"> | ||
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication"> | ||
<connections> | ||
<outlet property="delegate" destination="1j6-eX-QqZ" id="Bt3-b8-X4H"/> | ||
<outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/> | ||
</connections> | ||
</customObject> | ||
<customObject id="1j6-eX-QqZ" customClass="AppDelegate" customModule="Launcher" customModuleProvider="target"/> | ||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> | ||
<customObject id="-3" userLabel="Application"/> | ||
<customObject id="Voe-Tx-rLC" customClass="AppDelegate"/> | ||
</objects> | ||
</document> |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// main.m | ||
// Launcher | ||
// | ||
// Created by dstd on 17/11/2017. | ||
// Copyright © 2017 Denis Stanishevskiy. All rights reserved. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
|
||
int main(int argc, const char * argv[]) { | ||
return NSApplicationMain(argc, argv); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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