summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraristocratos <gnmjpl@gmail.com>2024-06-01 13:45:10 +0200
committeraristocratos <gnmjpl@gmail.com>2024-06-01 13:45:10 +0200
commit97d2fb567a41751d75ce3edbddab4944a4e6e186 (patch)
tree24255c8f796d515c99e881fe62e3573a4b65dc6a /src
parent3d46dc6969d1d9c981d84e81cf52b39a9f5f7941 (diff)
Fixed missing IO graphs in IO mode, issue #867
Diffstat (limited to 'src')
-rw-r--r--src/btop_draw.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/btop_draw.cpp b/src/btop_draw.cpp
index 76ad6e2..7d908a1 100644
--- a/src/btop_draw.cpp
+++ b/src/btop_draw.cpp
@@ -1184,8 +1184,7 @@ namespace Mem {
deque<long long> combined(disk.io_read.size(), 0);
rng::transform(disk.io_read, disk.io_write, combined.begin(), std::plus<long long>());
io_graphs[name] = Draw::Graph{
- disks_width - (io_mode ? 0 : 6),
- disks_io_h, "available", combined,
+ disks_width, disks_io_h, "available", combined,
graph_symbol, false, true, speed};
}
else {
@@ -1290,8 +1289,8 @@ namespace Mem {
+ Mv::l(disks_width - 6) + io_graphs.at(mount + "_activity")(disk.io_activity, redraw or data_same) + Theme::c("main_fg");
}
if (++cy > height - 3) break;
- if (not io_graphs.contains(mount)) continue;
if (io_graph_combined) {
+ if (not io_graphs.contains(mount)) continue;
auto comb_val = disk.io_read.back() + disk.io_write.back();
const string humanized = (disk.io_write.back() > 0 ? "▼"s : ""s) + (disk.io_read.back() > 0 ? "▲"s : ""s)
+ (comb_val > 0 ? Mv::r(1) + floating_humanizer(comb_val, true) : "RW");
@@ -1301,6 +1300,7 @@ namespace Mem {
cy += disks_io_h;
}
else {
+ if (not io_graphs.contains(mount + "_read") or not io_graphs.contains(mount + "_write")) continue;
const string human_read = (disk.io_read.back() > 0 ? "▲" + floating_humanizer(disk.io_read.back(), true) : "R");
const string human_write = (disk.io_write.back() > 0 ? "▼" + floating_humanizer(disk.io_write.back(), true) : "W");
if (disks_io_h <= 3) out += Mv::to(y+1+cy, x+1+cx) + string(5, ' ') + Mv::to(y+cy + disks_io_h, x+1+cx) + string(5, ' ');