Hide low-use disk to declutter

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-06-25 13:32:20 +02:00
parent 3968f6203d
commit 0ceaa13942
Signed by: luzifer
GPG key ID: D91C3E91E4CAD6F5

View file

@ -6,6 +6,7 @@ import sys
from block import * from block import *
CRIT = 90.0 CRIT = 90.0
HIDE = 70.0
MOUNT_BLACKLIST = ['/dev', '/efi', '/proc', '/run', '/sys', '/tmp'] MOUNT_BLACKLIST = ['/dev', '/efi', '/proc', '/run', '/sys', '/tmp']
FS_BLACKLIST = ['//', 'cgroup', 'dev', FS_BLACKLIST = ['//', 'cgroup', 'dev',
'fusectl', 'overlay', 'proc', 'run', 'sys', 'tmpfs'] 'fusectl', 'overlay', 'proc', 'run', 'sys', 'tmpfs']
@ -48,6 +49,9 @@ class Disk(Block):
if usage > CRIT: if usage > CRIT:
color = '#dd0000' color = '#dd0000'
if usage < HIDE:
continue
strings.append('<span color="#8FAAFC">{}</span>: <span color="{}">{:.0f}%</span>'.format( strings.append('<span color="#8FAAFC">{}</span>: <span color="{}">{:.0f}%</span>'.format(
mount, mount,
color, color,