feat(yabai): update

Add 10th workspace
Add `get_menu_bar_height` objc program
This commit is contained in:
reo101 2023-09-06 22:04:41 +03:00
parent 22ccaedc94
commit 26cafb1599
Signed by: reo101
GPG key ID: 675AA7EF13964ACB
7 changed files with 148 additions and 45 deletions

View file

@ -0,0 +1,21 @@
#import <Cocoa/Cocoa.h>
int main() {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSRect screenRect = [[NSScreen mainScreen] frame];
NSRect visibleRect = [[NSScreen mainScreen] visibleFrame];
// Show the menu bar temporarily to get its height
[NSMenu setMenuBarVisible:YES];
CGFloat menuBarHeight = screenRect.size.height - visibleRect.size.height;
printf("%d\n", (int) menuBarHeight);
// Hide the menu bar again
[NSMenu setMenuBarVisible:NO];
[pool drain];
return 0;
}
// vim: ft=objc :