diff --git a/drawing/FileSystem.lua b/drawing/FileSystem.lua index 73e3548..d0f0bb3 100644 --- a/drawing/FileSystem.lua +++ b/drawing/FileSystem.lua @@ -62,15 +62,15 @@ local update = function(cr) end local draw_static = function(cr) + Text.draw(header.text, cr) + Line.draw(header.underline, cr) + TextColumn.draw(labels, cr) end local draw_dynamic = function(cr, trigger) if trigger == 0 then update(cr) end - Text.draw(header.text, cr) - Line.draw(header.underline, cr) - TextColumn.draw(labels, cr) CompoundBar.draw(bars, cr) end diff --git a/drawing/Graphics.lua b/drawing/Graphics.lua index 84f532a..20fa65b 100644 --- a/drawing/Graphics.lua +++ b/drawing/Graphics.lua @@ -269,39 +269,36 @@ _MEM_UTIL_Y_ = nil _VID_UTIL_Y_ = nil local draw_static = function(cr) + Text.draw(header.text, cr) + Line.draw(header.underline, cr) + Text.draw(status.label, cr) + Line.draw(separator1, cr) + + Text.draw(internal_temp.label, cr) + Line.draw(separator2, cr) + + TextColumn.draw(clock_speed.labels, cr) + Line.draw(separator3, cr) + + Text.draw(gpu_util.label, cr) + Text.draw(mem_util.label, cr) + Text.draw(vid_util.label, cr) end local draw_dynamic = function(cr) update(cr) - Text.draw(header.text, cr) - Line.draw(header.underline, cr) - - Text.draw(status.label, cr) Text.draw(status.value, cr) - - Line.draw(separator1, cr) - - Text.draw(internal_temp.label, cr) Text.draw(internal_temp.value, cr) - - Line.draw(separator2, cr) - - TextColumn.draw(clock_speed.labels, cr) TextColumn.draw(clock_speed.values, cr) - Line.draw(separator3, cr) - - Text.draw(gpu_util.label, cr) Text.draw(gpu_util.value, cr) LabelPlot.draw(gpu_util.plot, cr) - Text.draw(mem_util.label, cr) Text.draw(mem_util.value, cr) LabelPlot.draw(mem_util.plot, cr) - Text.draw(vid_util.label, cr) Text.draw(vid_util.value, cr) LabelPlot.draw(vid_util.plot, cr) end diff --git a/drawing/Memory.lua b/drawing/Memory.lua index 900d311..0bb9a26 100644 --- a/drawing/Memory.lua +++ b/drawing/Memory.lua @@ -199,22 +199,23 @@ _RIGHT_X_ = nil _PLOT_Y_ = nil local draw_static = function(cr) + Text.draw(header.text, cr) + Line.draw(header.underline, cr) + Arc.draw(inner_ring, cr) + + Text.draw(swap.label, cr) + TextColumn.draw(cache.labels, cr) end local draw_dynamic = function(cr) update(cr) - Text.draw(header.text, cr) - Line.draw(header.underline, cr) Dial.draw(dial, cr) Arc.draw(cache_arc, cr) - Arc.draw(inner_ring, cr) CriticalText.draw(total_used, cr) - Text.draw(swap.label, cr) CriticalText.draw(swap.percent, cr) - TextColumn.draw(cache.labels, cr) TextColumn.draw(cache.percents, cr) LabelPlot.draw(plot, cr) diff --git a/drawing/Network.lua b/drawing/Network.lua index fcb4ba6..d39487e 100644 --- a/drawing/Network.lua +++ b/drawing/Network.lua @@ -133,20 +133,19 @@ _RIGHT_X_ = nil _UPLOAD_Y_ = nil local draw_static = function(cr) + Text.draw(header.text, cr) + Line.draw(header.underline, cr) + Text.draw(dnload.label, cr) + Text.draw(upload.label, cr) end local draw_dynamic = function(cr, update_frequency) update(cr, update_frequency) - Text.draw(header.text, cr) - Line.draw(header.underline, cr) - - Text.draw(dnload.label, cr) Text.draw(dnload.speed, cr) ScalePlot.draw(dnload.plot, cr) - Text.draw(upload.label, cr) Text.draw(upload.speed, cr) ScalePlot.draw(upload.plot, cr) end diff --git a/drawing/Pacman.lua b/drawing/Pacman.lua index 3c6d8a3..9e80ada 100644 --- a/drawing/Pacman.lua +++ b/drawing/Pacman.lua @@ -50,15 +50,14 @@ local update = function(cr) end local draw_static = function(cr) - + Text.draw(header.text, cr) + Line.draw(header.underline, cr) + TextColumn.draw(labels, cr) end local draw_dynamic = function(cr, log_is_changed) if log_is_changed then update(cr) end - Text.draw(header.text, cr) - Line.draw(header.underline, cr) - TextColumn.draw(labels, cr) TextColumn.draw(info, cr) end diff --git a/drawing/Processor.lua b/drawing/Processor.lua index 10aa0ac..06d96a0 100644 --- a/drawing/Processor.lua +++ b/drawing/Processor.lua @@ -252,33 +252,34 @@ _PROCESS_Y_ = nil _PLOT_Y_ = nil local draw_static = function(cr) + Text.draw(header.text, cr) + Line.draw(header.underline, cr) + + for c = 1, NUM_PHYSICAL_CORES do + local this_core = cores[c] + Arc.draw(this_core.inner_ring, cr) + end + Text.draw(process.label, cr) + Text.draw(ave_freq.label, cr) + Line.draw(separator, cr) + + Text.draw(total_load.label, cr) end local draw_dynamic = function(cr) update(cr) - Text.draw(header.text, cr) - Line.draw(header.underline, cr) - for c = 1, NUM_PHYSICAL_CORES do - local core = cores[c] - CompoundDial.draw(core.dials, cr) - Arc.draw(core.inner_ring, cr) - CriticalText.draw(core.coretemp_text, cr) + local this_core = cores[c] + CompoundDial.draw(this_core.dials, cr) + CriticalText.draw(this_core.coretemp_text, cr) end - Text.draw(process.label, cr) Text.draw(process.value, cr) - - Text.draw(ave_freq.label, cr) Text.draw(ave_freq.value, cr) - - Line.draw(separator, cr) - Text.draw(total_load.label, cr) CriticalText.draw(total_load.value, cr) - LabelPlot.draw(plot, cr) Table.draw(tbl, cr) diff --git a/drawing/ReadWrite.lua b/drawing/ReadWrite.lua index 51e8b2e..9ca0955 100644 --- a/drawing/ReadWrite.lua +++ b/drawing/ReadWrite.lua @@ -120,20 +120,19 @@ local update = function(cr, update_frequency) end local draw_static = function(cr) + Text.draw(header.text, cr) + Line.draw(header.underline, cr) + Text.draw(reads.label, cr) + Text.draw(writes.label, cr) end local draw_dynamic = function(cr, update_frequency) update(cr, update_frequency) - Text.draw(header.text, cr) - Line.draw(header.underline, cr) - - Text.draw(reads.label, cr) Text.draw(reads.rate, cr) ScalePlot.draw(reads.plot, cr) - Text.draw(writes.label, cr) Text.draw(writes.rate, cr) ScalePlot.draw(writes.plot, cr) end diff --git a/drawing/System.lua b/drawing/System.lua index 2e02d83..5968190 100644 --- a/drawing/System.lua +++ b/drawing/System.lua @@ -45,7 +45,9 @@ local info = _G_Widget_.TextColumn{ _TEXT_SPACING_ = nil local draw_static = function(cr) - + Text.draw(header.text, cr) + Line.draw(header.underline, cr) + TextColumn.draw(labels, cr) end local draw_dynamic = function(cr, log_is_changed) @@ -58,9 +60,6 @@ local draw_dynamic = function(cr, log_is_changed) "'/ synchronizing package lists/p' /var/log/pacman.log | tail -1")) end - Text.draw(header.text, cr) - Line.draw(header.underline, cr) - TextColumn.draw(labels, cr) TextColumn.draw(info, cr) end