From 0ceaa13942cbd87ffa53340445a3daac65e5d3a6 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sun, 25 Jun 2023 13:32:20 +0200 Subject: [PATCH] Hide low-use disk to declutter Signed-off-by: Knut Ahlers --- .config/i3blocks/disk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.config/i3blocks/disk b/.config/i3blocks/disk index c6546c1..17c4ac8 100755 --- a/.config/i3blocks/disk +++ b/.config/i3blocks/disk @@ -6,6 +6,7 @@ import sys from block import * CRIT = 90.0 +HIDE = 70.0 MOUNT_BLACKLIST = ['/dev', '/efi', '/proc', '/run', '/sys', '/tmp'] FS_BLACKLIST = ['//', 'cgroup', 'dev', 'fusectl', 'overlay', 'proc', 'run', 'sys', 'tmpfs'] @@ -48,6 +49,9 @@ class Disk(Block): if usage > CRIT: color = '#dd0000' + if usage < HIDE: + continue + strings.append('{}: {:.0f}%'.format( mount, color,