mirror of
https://github.com/aristocratos/btop.git
synced 2024-09-30 17:16:54 +13:00
This commit is contained in:
parent
97d2fb567a
commit
3f384c0a5d
1 changed files with 2 additions and 2 deletions
|
@ -824,10 +824,10 @@ namespace Cpu {
|
||||||
out += Theme::g("cpu").at(clamp(safeVal(cpu.core_percent, n).back(), 0ll, 100ll));
|
out += Theme::g("cpu").at(clamp(safeVal(cpu.core_percent, n).back(), 0ll, 100ll));
|
||||||
out += rjust(to_string(safeVal(cpu.core_percent, n).back()), (b_column_size < 2 ? 3 : 4)) + Theme::c("main_fg") + '%';
|
out += rjust(to_string(safeVal(cpu.core_percent, n).back()), (b_column_size < 2 ? 3 : 4)) + Theme::c("main_fg") + '%';
|
||||||
|
|
||||||
if (show_temps and not hide_cores and std::cmp_greater_equal(temp_graphs.size(), n)) {
|
if (show_temps and not hide_cores) {
|
||||||
const auto [temp, unit] = celsius_to(safeVal(cpu.temp, n+1).back(), temp_scale);
|
const auto [temp, unit] = celsius_to(safeVal(cpu.temp, n+1).back(), temp_scale);
|
||||||
const auto& temp_color = Theme::g("temp").at(clamp(safeVal(cpu.temp, n+1).back() * 100 / cpu.temp_max, 0ll, 100ll));
|
const auto& temp_color = Theme::g("temp").at(clamp(safeVal(cpu.temp, n+1).back() * 100 / cpu.temp_max, 0ll, 100ll));
|
||||||
if (b_column_size > 1)
|
if (b_column_size > 1 and std::cmp_greater_equal(temp_graphs.size(), n))
|
||||||
out += ' ' + Theme::c("inactive_fg") + graph_bg * 5 + Mv::l(5)
|
out += ' ' + Theme::c("inactive_fg") + graph_bg * 5 + Mv::l(5)
|
||||||
+ temp_graphs.at(n+1)(safeVal(cpu.temp, n+1), data_same or redraw);
|
+ temp_graphs.at(n+1)(safeVal(cpu.temp, n+1), data_same or redraw);
|
||||||
out += temp_color + rjust(to_string(temp), 4) + Theme::c("main_fg") + unit;
|
out += temp_color + rjust(to_string(temp), 4) + Theme::c("main_fg") + unit;
|
||||||
|
|
Loading…
Reference in a new issue