REF move crticial patterns out of core
This commit is contained in:
parent
42535dfcb5
commit
4faa18ded0
2
core
2
core
|
@ -1 +1 @@
|
||||||
Subproject commit f15bbe1bb31f75aad4b49566a11092e25a559205
|
Subproject commit 7a1f42c1fec42ff66ee8fcb1ae7d8fcd3926ff69
|
|
@ -11,8 +11,8 @@ local ScalePlot = require 'ScalePlot'
|
||||||
local HEADER_HEIGHT = 45
|
local HEADER_HEIGHT = 45
|
||||||
local HEADER_FONT_SIZE = 15
|
local HEADER_FONT_SIZE = 15
|
||||||
-- TODO move all this font stuff to the theme file
|
-- TODO move all this font stuff to the theme file
|
||||||
local HEADER_FONT_SLANT = CAIRO_FONT_SLANT_NORMAL
|
-- local HEADER_FONT_SLANT = CAIRO_FONT_SLANT_NORMAL
|
||||||
local HEADER_FONT_WEIGHT = CAIRO_FONT_WEIGHT_BOLD
|
-- local HEADER_FONT_WEIGHT = CAIRO_FONT_WEIGHT_BOLD
|
||||||
local HEADER_UNDERLINE_CAP = CAIRO_LINE_CAP_ROUND
|
local HEADER_UNDERLINE_CAP = CAIRO_LINE_CAP_ROUND
|
||||||
local HEADER_UNDERLINE_OFFSET = -20
|
local HEADER_UNDERLINE_OFFSET = -20
|
||||||
local HEADER_UNDERLINE_THICKNESS = 3
|
local HEADER_UNDERLINE_THICKNESS = 3
|
||||||
|
@ -280,7 +280,7 @@ end
|
||||||
-- text row with critical indicator
|
-- text row with critical indicator
|
||||||
|
|
||||||
-- TODO add limit to this
|
-- TODO add limit to this
|
||||||
M.initTextRowCrit = function(x, y, w, label, append_end)
|
M.initTextRowCrit = function(x, y, w, label, append_end, limit)
|
||||||
return{
|
return{
|
||||||
label = _G_Widget_.Text{
|
label = _G_Widget_.Text{
|
||||||
x = x,
|
x = x,
|
||||||
|
@ -295,6 +295,7 @@ M.initTextRowCrit = function(x, y, w, label, append_end)
|
||||||
x_align = 'right',
|
x_align = 'right',
|
||||||
text_color = _G_Patterns_.PRIMARY_FG,
|
text_color = _G_Patterns_.PRIMARY_FG,
|
||||||
critical_color = _G_Patterns_.CRITICAL_FG,
|
critical_color = _G_Patterns_.CRITICAL_FG,
|
||||||
|
critical_limit = limit,
|
||||||
append_end = append_end,
|
append_end = append_end,
|
||||||
text = '<NA>',
|
text = '<NA>',
|
||||||
font_spec = M.normal_font_spec,
|
font_spec = M.normal_font_spec,
|
||||||
|
|
|
@ -54,6 +54,7 @@ local bars = _G_Widget_.CompoundBar{
|
||||||
-- thickness = 12,
|
-- thickness = 12,
|
||||||
critical_limit = '>0.8',
|
critical_limit = '>0.8',
|
||||||
indicator_pattern = Patterns.INDICATOR_FG_PRIMARY,
|
indicator_pattern = Patterns.INDICATOR_FG_PRIMARY,
|
||||||
|
critical_pattern = Patterns.INDICATOR_FG_CRITICAL,
|
||||||
line_pattern = Patterns.INDICATOR_BG,
|
line_pattern = Patterns.INDICATOR_BG,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ local internal_temp = Common.initTextRowCrit(
|
||||||
_INTERNAL_TEMP_Y_,
|
_INTERNAL_TEMP_Y_,
|
||||||
_G_INIT_DATA_.SECTION_WIDTH,
|
_G_INIT_DATA_.SECTION_WIDTH,
|
||||||
'Internal Temperature',
|
'Internal Temperature',
|
||||||
'°C'
|
'°C',
|
||||||
|
'>80'
|
||||||
)
|
)
|
||||||
|
|
||||||
local _SEP_Y_2_ = _INTERNAL_TEMP_Y_ + _SEPARATOR_SPACING_
|
local _SEP_Y_2_ = _INTERNAL_TEMP_Y_ + _SEPARATOR_SPACING_
|
||||||
|
|
|
@ -61,6 +61,7 @@ local dial = _G_Widget_.Dial{
|
||||||
thickness = _DIAL_THICKNESS_,
|
thickness = _DIAL_THICKNESS_,
|
||||||
critical_limit = '>0.8',
|
critical_limit = '>0.8',
|
||||||
dial_pattern = _G_Patterns_.INDICATOR_FG_PRIMARY,
|
dial_pattern = _G_Patterns_.INDICATOR_FG_PRIMARY,
|
||||||
|
critical_pattern = _G_Patterns_.INDICATOR_FG_CRITICAL,
|
||||||
arc_pattern = _G_Patterns_.INDICATOR_BG
|
arc_pattern = _G_Patterns_.INDICATOR_BG
|
||||||
}
|
}
|
||||||
local cache_arc = _G_Widget_.Arc{
|
local cache_arc = _G_Widget_.Arc{
|
||||||
|
@ -89,7 +90,8 @@ local swap = Common.initTextRowCrit(
|
||||||
-- TODO this is silly
|
-- TODO this is silly
|
||||||
_RIGHT_X_ - _TEXT_LEFT_X_,
|
_RIGHT_X_ - _TEXT_LEFT_X_,
|
||||||
'Swap Usage',
|
'Swap Usage',
|
||||||
' %'
|
' %',
|
||||||
|
'80'
|
||||||
)
|
)
|
||||||
|
|
||||||
local cache = {
|
local cache = {
|
||||||
|
|
|
@ -64,6 +64,7 @@ local _create_core_ = function(cores, id, x, y)
|
||||||
spacing = _DIAL_SPACING_,
|
spacing = _DIAL_SPACING_,
|
||||||
num_dials = NUM_THREADS_PER_CORE,
|
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,
|
dial_pattern = _G_Patterns_.INDICATOR_FG_PRIMARY,
|
||||||
arc_pattern = _G_Patterns_.INDICATOR_BG
|
arc_pattern = _G_Patterns_.INDICATOR_BG
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue