- Make toolbars in AppKit compact where possible
- Hide useless menu bar items in Chrome
- Minor fixes to FaceTime.app
Last active
May 18, 2025 01:56
-
-
Save NSExceptional/45faffa17b26e3064b66aa6a07b32abe to your computer and use it in GitHub Desktop.
Some macOS tweaks I wrote
This file contains hidden or 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
// | |
// Created by Tanner Bennett on 2022-09-22 | |
// Copyright © 2022 Tanner Bennett. All rights reserved. | |
// | |
#import <AppKit/AppKit.h> | |
%hook NSWindow | |
- (void)setToolbarStyle:(NSWindowToolbarStyle)toolbarStyle { | |
%orig(NSWindowToolbarStyleUnifiedCompact); | |
} | |
- (void)display { | |
if (self.toolbarStyle != NSWindowToolbarStyleUnifiedCompact) { | |
self.toolbarStyle = NSWindowToolbarStyleUnifiedCompact; | |
} | |
%orig; | |
} | |
- (BOOL)makeFirstResponder:(NSResponder *)responder { | |
if (self.toolbarStyle != NSWindowToolbarStyleUnifiedCompact) { | |
self.toolbarStyle = NSWindowToolbarStyleUnifiedCompact; | |
} | |
return %orig; | |
} | |
%end |
This file contains hidden or 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
// | |
// Created by Tanner Bennett on 2022-12-10 | |
// Copyright © 2022 Tanner Bennett. All rights reserved. | |
// | |
#import <AppKit/AppKit.h> | |
// Don't ever pause my video when I switch apps or spaces | |
%hook VideoPauseUtility | |
+ (BOOL)shouldPauseSendingVideo:(id)controller { | |
return NO; | |
} | |
%end | |
// Allow resizing the window even smaller than normally allowed | |
%hook VideoCallController | |
- (void)_createWindowWithSize:(NSSize)size minSize:(NSSize)minSize { | |
minSize = CGSizeMake(minSize.width / 2.f, minSize.height / 2.f); | |
%orig; | |
} | |
%end | |
%hook NSWindow | |
- (void)setContentMinSize:(NSSize)minSize { | |
minSize = CGSizeMake(670/2, 420/2); | |
%orig; | |
} | |
- (void)setMinSize:(NSSize)minSize { | |
minSize = CGSizeMake(670/2, 420/2); | |
%orig; | |
} | |
%end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment