Advertisement
helenaryuu

cpu_monitor_awesome

Dec 12th, 2012
1,166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.69 KB | None | 0 0
  1. -- {{{ CPU
  2.   -- Core Temp
  3.     tempwidget = widget({ type = "textbox" })
  4.     vicious.register(tempwidget, vicious.widgets.thermal, "$1 C", 5, "thermal_zone0")
  5.  -- Icon
  6.     tempicon = widget({type = "imagebox" })
  7.     tempicon.image = image(beautiful.widget_temp)
  8. -- Readout
  9.   -- Icon
  10.     cpuicon = widget({ type = "imagebox" })
  11.     cpuicon.image = image(beautiful.widget_cpu)
  12.     cpuicon.resize = false
  13.     awful.widget.layout.margins[cpuicon] = { top = 3 }
  14.   -- Percentage
  15.     cpu1 = widget({ type = "textbox" })
  16.     vicious.register(cpu1, vicious.widgets.cpu, "(1): $1%")
  17.     cpu2 = widget ({ type = "textbox" })
  18.     vicious.register(cpu2, vicious.widgets.cpu, "(2): $2%")
  19.   -- CPU1 Meter
  20.     cpubar = awful.widget.progressbar()
  21.     cpubar:set_width(44)
  22.     cpubar:set_height(9)
  23.     cpubar:set_vertical(false)
  24.     cpubar:set_background_color("#3F3F3F")
  25.     cpubar:set_color("#ff6565" )
  26.     vicious.register(cpubar, vicious.widgets.cpu, "$1", 7)
  27.   -- CPU2 Meter
  28.     cpubar2 = awful.widget.progressbar()
  29.     cpubar2:set_width(44)
  30.     cpubar2:set_height(9)
  31.     cpubar2:set_vertical(false)
  32.     cpubar2:set_background_color("#3F3F3F")
  33.     cpubar2:set_color("#ff6565" )
  34.     vicious.register(cpubar2, vicious.widgets.cpu, "$2", 7)
  35.   -- Align progressbars
  36.     awful.widget.layout.margins[cpubar.widget] = { top = 4 }
  37.     awful.widget.layout.margins[cpubar2.widget] = { top = 4 }
  38.   -- Frequency
  39.     --freq1 = widget({ type = "textbox" })
  40.     --vicious.register(freq1, vicious.widgets.cpufreq, "$2 Ghz", 9, "cpu0")
  41.     --freq2 = widget({ type = "textbox" })
  42.     --vicious.register(freq2, vicious.widgets.cpufreq, "$2 Ghz", 9, "cpu1")
  43.   -- Cache that shit
  44.     vicious.cache(vicious.widgets.cpu)
  45. --- }}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement