     return false
 
   addCommands: (item) ->
-    atom.commands.add 'atom-workspace',"smart-daemon-control:configure-#{item.name}", =>
+    item.command = atom.commands.add 'atom-workspace',"smart-daemon-control:configure-#{item.name}", =>
       # console.log @items
       @eventBus.emit 'daemon-item-configure-view:show', @items[item.id]

  constructor: (@eventBus,data) ->
    {@items,@checks}=data
    # data=undefined #reset list
    console.log @items
    console.log @checks
    @reqEventBus()
    if not data?
      @items = {} =

      item.checkAdded = item.cmdCheck

  remove: (item) =>
    # console.log item
    #if daemonItem is in collection, +check name?
    if item.id?
      #if item is on top
      item.command.dispose()
      if @items.inc == (@items.inc-1)
        delete @items[item.id]
      #else swap deletet with top item
