Class: Barr::Blocks::Processes

Inherits:
Barr::Block show all
Defined in:
lib/barr/blocks/processes.rb

Instance Attribute Summary

Attributes inherited from Barr::Block

#align, #bgcolor, #fgcolor, #icon, #interval, #manager, #output

Instance Method Summary collapse

Methods inherited from Barr::Block

#<<, #colors, #destroy, #destroy!, #draw, #initialize, #reassign_deprecated_option, #tmp_filename, #update

Constructor Details

This class inherits a constructor from Barr::Block

Instance Method Details

#sys_cmdObject



11
12
13
# File 'lib/barr/blocks/processes.rb', line 11

def sys_cmd
  `ps -e | wc -l`.chomp
end

#update!Object



7
8
9
# File 'lib/barr/blocks/processes.rb', line 7

def update!
 @output = sys_cmd
end