From d15ede5ec9a7cb6e920dcd2ad3f177a57cd99f7b Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Tue, 6 Jul 2021 19:32:18 -0400 Subject: [PATCH] ENH use numbers for critical threshhold --- core | 2 +- drawing/Common.lua | 2 +- drawing/FileSystem.lua | 2 +- drawing/Graphics.lua | 2 +- drawing/Memory.lua | 6 +++--- drawing/Processor.lua | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core b/core index 7a1f42c..6243b9c 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 7a1f42c1fec42ff66ee8fcb1ae7d8fcd3926ff69 +Subproject commit 6243b9ca1540115cc66327286ab1e711a793e5c3 diff --git a/drawing/Common.lua b/drawing/Common.lua index 555f31e..0fb4425 100644 --- a/drawing/Common.lua +++ b/drawing/Common.lua @@ -103,7 +103,7 @@ M.initPercentPlot = function(x, y, w, h, spacing, label) y = y, x_align = 'right', append_end = '%', - critical_limit = '>80', + critical_limit = 80, text_color = _G_Patterns_.PRIMARY_FG, critical_color = _G_Patterns_.PRIMARY_FG, font_spec = M.normal_font_spec, diff --git a/drawing/FileSystem.lua b/drawing/FileSystem.lua index 90bda8c..bc64f8a 100644 --- a/drawing/FileSystem.lua +++ b/drawing/FileSystem.lua @@ -52,7 +52,7 @@ local bars = _G_Widget_.CompoundBar{ spacing = _SPACING_, num_bars = FS_NUM, -- thickness = 12, - critical_limit = '>0.8', + critical_limit = 0.8, indicator_pattern = Patterns.INDICATOR_FG_PRIMARY, critical_pattern = Patterns.INDICATOR_FG_CRITICAL, line_pattern = Patterns.INDICATOR_BG, diff --git a/drawing/Graphics.lua b/drawing/Graphics.lua index e79a726..6ef7730 100644 --- a/drawing/Graphics.lua +++ b/drawing/Graphics.lua @@ -44,7 +44,7 @@ local internal_temp = Common.initTextRowCrit( _G_INIT_DATA_.SECTION_WIDTH, 'Internal Temperature', '°C', - '>80' + 80 ) local _SEP_Y_2_ = _INTERNAL_TEMP_Y_ + _SEPARATOR_SPACING_ diff --git a/drawing/Memory.lua b/drawing/Memory.lua index 44ee2fe..d38cf00 100644 --- a/drawing/Memory.lua +++ b/drawing/Memory.lua @@ -59,7 +59,7 @@ local dial = _G_Widget_.Dial{ y = DIAL_Y, radius = DIAL_RADIUS, thickness = _DIAL_THICKNESS_, - critical_limit = '>0.8', + critical_limit = 0.8, dial_pattern = _G_Patterns_.INDICATOR_FG_PRIMARY, critical_pattern = _G_Patterns_.INDICATOR_FG_CRITICAL, arc_pattern = _G_Patterns_.INDICATOR_BG @@ -77,7 +77,7 @@ local text_ring = Common.initTextRing( DIAL_Y, DIAL_RADIUS - _DIAL_THICKNESS_ / 2 - 2, '%', - '>80' + 80 ) local _LINE_1_Y_ = header.bottom_y + _TEXT_Y_OFFSET_ @@ -91,7 +91,7 @@ local swap = Common.initTextRowCrit( _RIGHT_X_ - _TEXT_LEFT_X_, 'Swap Usage', ' %', - '80' + 80 ) local cache = { diff --git a/drawing/Processor.lua b/drawing/Processor.lua index 81a70af..cace52d 100644 --- a/drawing/Processor.lua +++ b/drawing/Processor.lua @@ -63,7 +63,7 @@ local _create_core_ = function(cores, id, x, y) outer_radius = _DIAL_OUTER_RADIUS_, spacing = _DIAL_SPACING_, num_dials = NUM_THREADS_PER_CORE, - critical_limit = '>0.8', + critical_limit = 0.8, critical_pattern = _G_Patterns_.INDICATOR_FG_CRITICAL, dial_pattern = _G_Patterns_.INDICATOR_FG_PRIMARY, arc_pattern = _G_Patterns_.INDICATOR_BG @@ -73,7 +73,7 @@ local _create_core_ = function(cores, id, x, y) y, _DIAL_INNER_RADIUS_ - 2, '°C', - '>90' + 90 ), coretemp_path = string.format(CORETEMP_PATH, hwmon_index, 'temp'..(id + 2)..'_input'), conky_loads = conky_loads,