btop icon indicating copy to clipboard operation
btop copied to clipboard

[REQUEST] Option to only show Used/Free disk space

Open MithicSpirit opened this issue 3 years ago • 3 comments

There should be an option to only show the Used or Free disk space rather than both at the same time since it is redundant information. I'd be fine with a single boolean toggle to only show free disk space (or one that only shows used disk space) but in my opinion the ideal solution would be to have one option with three states: both (if space allows), only free, and only used.

MithicSpirit avatar Jun 06 '22 03:06 MithicSpirit

I agree with this. The fact that it shows both stats means that I always have to read the labels and double check that I'm looking at the right graph.

For me it makes a lot more sense to only show "Used", so I can quickly glance across all my disks and see if any of them are nearing full.

Hubro avatar Dec 11 '23 10:12 Hubro

This annoyed me as well. I created a patch to remove the "Free" bars, feel free to use it:

--- a/src/btop_draw.cpp
+++ b/src/btop_draw.cpp
@@ -1340,13 +1340,6 @@
 						+ disk_meters_used.at(mount)(disk.used_percent) + rjust(human_used, (big_disk ? 9 : 5));
 					if (++cy > height - 3) break;
 
-					if (disk_meters_free.contains(mount) and cmp_less_equal(disks.size() * 3 + (show_io_stat ? disk_ios : 0), height - 1)) {
-						out += Mv::to(y+1+cy, x+1+cx) + (big_disk ? " Free:" + rjust(to_string(disk.free_percent) + '%', 4) : "F") + ' '
-						+ disk_meters_free.at(mount)(disk.free_percent) + rjust(human_free, (big_disk ? 9 : 5));
-						cy++;
-						if (cmp_less_equal(disks.size() * 4 + (show_io_stat ? disk_ios : 0), height - 1)) cy++;
-					}
-
 				}
 			}
 			if (cy < height - 2) out += Mv::to(y+1+cy, x+1+cx) + divider;

when applied, it will look like this: image

freijon avatar Jun 25 '24 08:06 freijon

Dang, that looks a lot better...

Hubro avatar Jun 25 '24 19:06 Hubro