 
 enoughTimePassed = (time) ->
   return lastHeartbeat + 120000 < time
-
-cleanupOnUninstall = () ->
-  if unloadHandler?
-    unloadHandler.dispose()
-    unloadHandler = null
-  unloadHandler = atom.packages.onDidUnloadPackage((p) ->
-    if p? and p.name == 'wakatime'
-      removeCLI()
-      if unloadHandler?
-        unloadHandler.dispose()
-        unloadHandler = null
-  )
 
 setupEventHandlers = (callback) ->
   atom.workspace.observeTextEditors (editor) =>


  activate: (state) ->
    packageVersion = atom.packages.getLoadedPackage('wakatime').metadata.version
    cleanupOnUninstall()
    setupConfigs()
    @settingChangedObserver = atom.config.observe 'wakatime', settingChangedHandler



# package-global attributes
packageVersion = null
lastHeartbeat = 0
lastFile = ''
statusBarTileView = null
