         
         dateFormatter.timeZone = NSTimeZone(abbreviation: "GMT")
         
-        NSWorkspace.sharedWorkspace().notificationCenter.addObserver(
+        workspace.notificationCenter.addObserver(
                 self,
                 selector: "onSwitchApp",
                 name: NSWorkspaceDidActivateApplicationNotification,


    let statusItem : NSStatusItem = NSStatusBar.systemStatusBar().statusItemWithLength(64.0)
    let dateFormatter : NSDateFormatter = NSDateFormatter()
    
    let wImage : NSImage = NSImage(named: "mitten-w")!
    let bImage : NSImage = NSImage(named: "mitten-b")!


    func onSwitchApp() {
        if(startedAt != nil) {
            currentApp = workspace.frontmostApplication
            if(currentApp != nil) {
                NSLog("--> current app: %@", currentApp!.bundleIdentifier!)
            }
        }
    }
    
