-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
1,255 additions
and
914 deletions.
There are no files selected for viewing
200 changes: 154 additions & 46 deletions
200
BetterBars.xcodeproj/project.pbxproj → Artemisia.xcodeproj/project.pbxproj
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions
23
Artemisia.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
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,23 @@ | ||
{ | ||
"pins" : [ | ||
{ | ||
"identity" : "maccontrolcenterui", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/NSAntoine/MacControlCenterUI.git", | ||
"state" : { | ||
"branch" : "main", | ||
"revision" : "520159dcb9b4a54a9891725338c93b2fdaf10fbb" | ||
} | ||
}, | ||
{ | ||
"identity" : "menubarextraaccess", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/orchetect/MenuBarExtraAccess", | ||
"state" : { | ||
"revision" : "f5896b47e15e114975897354c7e1082c51a2bffd", | ||
"version" : "1.0.5" | ||
} | ||
} | ||
], | ||
"version" : 2 | ||
} |
7 changes: 1 addition & 6 deletions
7
BetterBars/BetterBars.entitlements → ....xcuserdatad/IDEFindNavigatorScopes.plist
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,10 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.app-sandbox</key> | ||
<true/> | ||
<key>com.apple.security.files.user-selected.read-only</key> | ||
<true/> | ||
</dict> | ||
<array/> | ||
</plist> |
77 changes: 77 additions & 0 deletions
77
Artemisia.xcodeproj/xcshareddata/xcschemes/Artemisia.xcscheme
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,77 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1500" | ||
version = "1.7"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "CEEEBE092ADA7C940087CB1C" | ||
BuildableName = "Artemisia.app" | ||
BlueprintName = "Artemisia" | ||
ReferencedContainer = "container:Artemisia.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
shouldAutocreateTestPlan = "YES"> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Release" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
<BuildableProductRunnable | ||
runnableDebuggingMode = "0"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "CEEEBE092ADA7C940087CB1C" | ||
BuildableName = "Artemisia.app" | ||
BlueprintName = "Artemisia" | ||
ReferencedContainer = "container:Artemisia.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<BuildableProductRunnable | ||
runnableDebuggingMode = "0"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "CEEEBE092ADA7C940087CB1C" | ||
BuildableName = "Artemisia.app" | ||
BlueprintName = "Artemisia" | ||
ReferencedContainer = "container:Artemisia.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
6 changes: 6 additions & 0 deletions
6
Artemisia.xcodeproj/xcuserdata/user.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
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,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Bucket | ||
uuid = "B0D7C5F1-F3BC-4664-9FE4-4CCB56CA5BF4" | ||
type = "1" | ||
version = "2.0"> | ||
</Bucket> |
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,20 @@ | ||
// | ||
// AppDelegate.h | ||
// Artemisia | ||
// | ||
// Created by Serena on 14/10/2023. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
#import "DesktopViewController.h" | ||
|
||
@interface AppDelegate : NSObject <NSApplicationDelegate> | ||
|
||
@property DesktopViewController *desktopVC; | ||
@property NSStatusItem *statusItem; | ||
|
||
+(instancetype)sharedDelegate; | ||
|
||
|
||
@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,86 @@ | ||
// | ||
// AppDelegate.m | ||
// Artemisia | ||
// | ||
// Created by Serena on 14/10/2023. | ||
// | ||
|
||
#import "AppDelegate.h" | ||
#import "EventMonitor.h" | ||
#import "WindowController.h" | ||
#import "DesktopViewController.h" | ||
|
||
@implementation AppDelegate | ||
|
||
+ (instancetype)sharedDelegate { | ||
static AppDelegate *del; | ||
static dispatch_once_t onceToken; | ||
dispatch_once(&onceToken, ^{ | ||
del = [[AppDelegate alloc] init]; | ||
}); | ||
|
||
return del; | ||
} | ||
|
||
|
||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { | ||
// Insert code here to initialize your application | ||
[NSApplication.sharedApplication setActivationPolicy:NSApplicationActivationPolicyAccessory]; | ||
|
||
[[EventMonitor sharedMonitor] startMonitoring]; | ||
|
||
WindowController *ctrl = [WindowController controllerWithKind:WindowControllerWindowKindBar]; | ||
self.desktopVC = (DesktopViewController *)ctrl.contentViewController; | ||
[ctrl showWindow:self]; | ||
|
||
self.statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength]; | ||
self.statusItem.button.image = [NSImage imageWithSystemSymbolName:@"slider.horizontal.below.rectangle" accessibilityDescription:nil]; | ||
|
||
NSMenu *menu = [[NSMenu alloc] init]; | ||
NSMenuItem *itm = [[NSMenuItem alloc] init]; | ||
itm.view = [self titleView]; | ||
[menu addItem:itm]; | ||
|
||
[menu addItem: NSMenuItem.separatorItem]; | ||
NSMenuItem *quit = [menu addItemWithTitle:@"Quit" action:@selector(terminateApp) keyEquivalent:@"q"]; | ||
quit.target = self; | ||
|
||
self.statusItem.menu = menu; | ||
} | ||
|
||
-(void)terminateApp { | ||
[NSApplication.sharedApplication terminate:nil]; | ||
} | ||
|
||
-(NSView *)titleView { | ||
NSView *v = [[NSView alloc] init]; | ||
[v setFrameSize:CGSizeMake(150, 20)]; | ||
|
||
NSTextField *titleField = [NSTextField labelWithString: NSRunningApplication.currentApplication.localizedName ]; | ||
titleField.translatesAutoresizingMaskIntoConstraints = NO; | ||
|
||
titleField.font = [NSFont preferredFontForTextStyle:NSFontTextStyleHeadline options:@{}]; | ||
|
||
[v addSubview:titleField]; | ||
|
||
[NSLayoutConstraint activateConstraints:@[ | ||
[titleField.topAnchor constraintEqualToAnchor:v.topAnchor constant:2.5], | ||
[titleField.leadingAnchor constraintEqualToAnchor:v.leadingAnchor constant:14] | ||
]]; | ||
|
||
return v; | ||
} | ||
|
||
|
||
|
||
- (void)applicationWillTerminate:(NSNotification *)aNotification { | ||
// Insert code here to tear down your application | ||
} | ||
|
||
|
||
- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app { | ||
return YES; | ||
} | ||
|
||
|
||
@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,24 @@ | ||
// | ||
// WindowController.h | ||
// Artemisia | ||
// | ||
// Created by Serena on 14/10/2023. | ||
// | ||
|
||
#ifndef WindowController_h | ||
#define WindowController_h | ||
|
||
#import <Cocoa/Cocoa.h> | ||
|
||
typedef NS_CLOSED_ENUM(NSUInteger, WindowControllerWindowKind) { | ||
WindowControllerWindowKindBar, | ||
}; | ||
|
||
@interface WindowController : NSWindowController | ||
|
||
+(instancetype)controllerWithKind: (WindowControllerWindowKind)kind; | ||
|
||
@end | ||
|
||
|
||
#endif /* WindowController_h */ |
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,36 @@ | ||
// | ||
// WindowController.m | ||
// Artemisia | ||
// | ||
// Created by Serena on 14/10/2023. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import "DesktopViewController.h" | ||
#import "WindowController.h" | ||
|
||
@implementation WindowController | ||
+ (instancetype)controllerWithKind:(WindowControllerWindowKind)kind { | ||
NSViewController *ctrller; | ||
|
||
switch (kind) { | ||
case WindowControllerWindowKindBar: | ||
ctrller = [[DesktopViewController alloc] init]; | ||
} | ||
|
||
NSWindow *window = [NSWindow windowWithContentViewController:ctrller]; | ||
WindowController *ret = [[WindowController alloc] initWithWindow:window]; | ||
|
||
switch (kind) { | ||
case WindowControllerWindowKindBar: | ||
window.styleMask -= NSWindowStyleMaskTitled; | ||
window.backgroundColor = [NSColor clearColor]; | ||
// window.level = CGWindowLevelForKey(kCGMaximumWindowLevelKey); | ||
window.level = NSFloatingWindowLevel; | ||
window.collectionBehavior = NSWindowCollectionBehaviorCanJoinAllSpaces; | ||
[window setFrame:NSScreen.mainScreen.visibleFrame display:YES]; | ||
} | ||
|
||
return ret; | ||
} | ||
@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 |
---|---|---|
@@ -1,15 +1,19 @@ | ||
// | ||
// main.m | ||
// BetterBars | ||
// Artemisia | ||
// | ||
// Created by Serena on 14/10/2023. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
#import "AppDelegate.h" | ||
|
||
int main(int argc, const char * argv[]) { | ||
@autoreleasepool { | ||
// Setup code that might create autoreleased objects goes here. | ||
} | ||
|
||
AppDelegate *del = [AppDelegate sharedDelegate]; | ||
NSApplication.sharedApplication.delegate = del; | ||
return NSApplicationMain(argc, argv); | ||
} |
File renamed without changes.
Oops, something went wrong.