alltom.com

Look of Disapproval in your status bar

I hacked together an OS X app that puts ಠ_ಠ in your status bar. If you click it, ಠ_ಠ gets put on your clipboard. What a world!

It looks like this at the top of your screen:

Download it here (tested in OS X 10.9)

Build it yourself

You can also really easily build it yourself if you have Xcode.

  1. Create a new Cocoa application (used the class prefix "LOD" (optional))
  2. Delete the main window from the xib (optional, prevents a window from appearing on startup)
  3. Set "Application is background only" to YES in the info.plist (optional, prevents the app's icon from appearing in the doc and task switcher)
  4. Paste the code below into the app delegate's source (assuming you used "LOD" as your class prefix)
NSString *theLook = @"ಠ_ಠ";

@implementation LODAppDelegate
{
    NSStatusItem *statusItem;
}

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
    statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength];
    statusItem.title = theLook;
    statusItem.highlightMode = YES;
    statusItem.target = self;
    statusItem.action = @selector(statusItemClicked);
    statusItem.doubleAction = @selector(statusItemDoubleClicked);
}

- (void)statusItemClicked
{
    NSPasteboard *pb = [NSPasteboard generalPasteboard];
    [pb clearContents];
    [pb setData:[theLook dataUsingEncoding:NSUTF8StringEncoding] forType:NSPasteboardTypeString];
}

- (void)statusItemDoubleClicked
{
    [NSApp performSelector:@selector(terminate:) withObject:nil afterDelay:0.0];
}