diff --git a/core b/core index a2c1c08..9a9a86c 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit a2c1c089c9933b191c5ef4fd1569b3ede80acdd3 +Subproject commit 9a9a86cdacf0cbbcc37eb2db908ec4ade78d3e99 diff --git a/drawing/Common.lua b/drawing/Common.lua index 7b92ed4..22bf110 100644 --- a/drawing/Common.lua +++ b/drawing/Common.lua @@ -44,7 +44,7 @@ M.right_text_style = _G_Widget_.text_style( ) local _bare_text = function(pt, text, style) - local fmt = _G_Widget_.text_format(false, false, false) + local fmt = _G_Widget_.text_format(false, false) return _G_Widget_.Text(pt, text, style, fmt) end @@ -86,7 +86,7 @@ M.Header = function(x, y, w, s) 'left', 'top' ), - _G_Widget_.text_format(false, false, false) + _G_Widget_.text_format(false, false) ), bottom_y = bottom_y, -- underline = _G_Widget_.Line{ @@ -155,8 +155,7 @@ M.initPercentPlot = function(x, y, w, h, spacing, label) 'center' ), _G_Widget_.text_format( - false, - '%', + '%s%%', false ), _G_Patterns_.CRITICAL_FG, @@ -279,7 +278,7 @@ end -------------------------------------------------------------------------------- -- ring with text data in the center -M.initTextRing = function(x, y, r, append_end, limit) +M.initTextRing = function(x, y, r, fmt, limit) return { ring = M.initRing(x, y, r), -- value = _G_Widget_.CriticalText{ @@ -302,11 +301,7 @@ M.initTextRing = function(x, y, r, append_end, limit) 'center', 'center' ), - _G_Widget_.text_format( - false, - append_end, - false - ), + _G_Widget_.text_format(fmt, false), _G_Patterns_.CRITICAL_FG, limit ), @@ -428,7 +423,6 @@ M.initTextRowCrit = function(x, y, w, label, append_end, limit) 'center' ), _G_Widget_.text_format( - false, append_end, false ), @@ -465,7 +459,7 @@ M.initTextRows = function(x, y, w, spacing, labels) _G_Widget_.make_point(x, y), labels, M.left_text_style, - _G_Widget_.text_format(false, false, false), + _G_Widget_.text_format(false, false), spacing ), -- values = _G_Widget_.TextColumn{ @@ -482,7 +476,7 @@ M.initTextRows = function(x, y, w, spacing, labels) _G_Widget_.make_point(x + w, y), #labels, M.right_text_style, - _G_Widget_.text_format(false, false, false), + _G_Widget_.text_format(false, false), spacing ) } diff --git a/drawing/FileSystem.lua b/drawing/FileSystem.lua index f1d3ec0..20efaa1 100644 --- a/drawing/FileSystem.lua +++ b/drawing/FileSystem.lua @@ -99,7 +99,7 @@ local labels = _G_Widget_.TextColumn( 'left', 'center' ), - _G_Widget_.text_format(false, false, false), + _G_Widget_.text_format(false, false), _SPACING_ ) diff --git a/drawing/Graphics.lua b/drawing/Graphics.lua index 6ef7730..0fbccbc 100644 --- a/drawing/Graphics.lua +++ b/drawing/Graphics.lua @@ -43,7 +43,7 @@ local internal_temp = Common.initTextRowCrit( _INTERNAL_TEMP_Y_, _G_INIT_DATA_.SECTION_WIDTH, 'Internal Temperature', - '°C', + '%s°C', 80 ) diff --git a/drawing/Memory.lua b/drawing/Memory.lua index 20e073b..280edcb 100644 --- a/drawing/Memory.lua +++ b/drawing/Memory.lua @@ -86,7 +86,7 @@ local text_ring = Common.initTextRing( DIAL_X, DIAL_Y, DIAL_RADIUS - _DIAL_THICKNESS_ / 2 - 2, - '%', + '%s%%', 80 ) @@ -100,7 +100,7 @@ local swap = Common.initTextRowCrit( -- TODO this is silly _RIGHT_X_ - _TEXT_LEFT_X_, 'Swap Usage', - ' %', + '%s%%', 80 ) @@ -143,7 +143,7 @@ local cache = { 'left', 'center' ), - _G_Widget_.text_format(false, false, false), + _G_Widget_.text_format(false, false), _TEXT_SPACING_ ), percents = _G_Widget_.initTextColumnN( @@ -158,7 +158,7 @@ local cache = { 'right', 'center' ), - _G_Widget_.text_format(false, '%', false), + _G_Widget_.text_format('%s%%', false), _TEXT_SPACING_ ), } diff --git a/drawing/Processor.lua b/drawing/Processor.lua index ceebd64..2e524ea 100644 --- a/drawing/Processor.lua +++ b/drawing/Processor.lua @@ -87,7 +87,7 @@ local _create_core_ = function(cores, id, x, y) x, y, _DIAL_INNER_RADIUS_ - 2, - '°C', + '%s°C', 90 ), coretemp_path = string.format(CORETEMP_PATH, hwmon_index, 'temp'..(id + 2)..'_input'),