Skip to content

Instantly share code, notes, and snippets.

@keefo
Created August 25, 2013 00:40
Show Gist options
  • Save keefo/6331196 to your computer and use it in GitHub Desktop.
Save keefo/6331196 to your computer and use it in GitHub Desktop.
#import "AppDelegate.h"
@interface NSStatusBar(Private)
- (id)_statusItemWithLength:(double)length withPriority:(int)priority;
@end
@interface AppDelegate()
{
NSStatusItem *item;
}
@end
@implementation AppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
NSStatusBar *bar = [NSStatusBar systemStatusBar];
item = [bar _statusItemWithLength:NSVariableStatusItemLength withPriority:INT_MIN];
[item setTitle:NSLocalizedString(@"RightMost",@"")];
[item setImage:[NSImage imageNamed:@"NSActionTemplate"]];
[item setHighlightMode:YES];
[item setMenu:_menu];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment