-cputextwidget.text = heading('CPU')..': 00% '
-wicked.register(cputextwidget, 'cpu', function (widget, args)
+ if cpu.color == color then return end
+ local img = image.argb32(11, 16, nil)
+ draw_dashes_h(img, 0, 4, 2, 1, 7, color)
+ draw_dashes_h(img, 0, 11, 2, 1, 7, color)
+ draw_dashes_v(img, 0, 4, 2, 1, 7, color)
+ draw_dashes_v(img, 7, 4, 2, 1, 7, color)
+ img:draw_rectangle(2, 6, 4, 4, true, color)
+ cpu.widget.image = img
+ cpu.percent = value
+ end
+ table.insert(mywidgets, cpu.widget)
+ cpuwidgets[i] = cpu
+end
+
+cputextwidget = widget{ type = 'textbox' }
+
+vicious.register(cputextwidget, vicious.widgets.cpu,
+function (widget, args)