import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { let statusItem = NSStatusBar.systemStatusBar().statusItemWithLength(-2) let popover = NSPopover() func applicationDidFinishLaunching(aNotification: NSNotification) { // Insert code here to initialize your application if let button = statusItem.button { button.image = NSImage(named: "...") button.action = Selector(