diff --git a/drawing/Common.lua b/drawing/Common.lua index dcb9e33..b63b51d 100644 --- a/drawing/Common.lua +++ b/drawing/Common.lua @@ -313,7 +313,7 @@ M.initTextRing = function(x, y, r, fmt, limit) ring = M.initRing(x, y, r), value = ThresholdText.build_formatted( F.make_point(x, y), - nil, + 0, Text.style( M.normal_font_spec, Theme.PRIMARY_FG, diff --git a/drawing/Memory.lua b/drawing/Memory.lua index a6de42f..8a2f01d 100644 --- a/drawing/Memory.lua +++ b/drawing/Memory.lua @@ -49,7 +49,7 @@ return function(update_freq) DIAL_X, DIAL_Y, DIAL_RADIUS - DIAL_THICKNESS / 2 - 2, - '%s%%', + '%.0f%%', 80 ) @@ -130,10 +130,15 @@ return function(update_freq) slab_reclaimable_kb = __string_match(Util.read_file('/proc/meminfo'), MEMINFO_REGEX) - local used_percent = (mem_total_kb - memfree_kb - cached_kb - buffers_kb - slab_reclaimable_kb) / mem_total_kb + local used_percent = + (mem_total_kb - + memfree_kb - + cached_kb - + buffers_kb - + slab_reclaimable_kb) / mem_total_kb Dial.set(dial, used_percent) - Common.text_ring_set(text_ring, cr, Util.round_to_string(used_percent * 100)) + Common.text_ring_set(text_ring, cr, used_percent * 100) Common.text_row_crit_set( swap, cr, (swap_total_kb - swap_free_kb) / swap_total_kb * 100