From 20d17273ce0fcd2bb1a2109287e348c78f5d1d92 Mon Sep 17 00:00:00 2001 From: Derek Date: Thu, 27 Aug 2026 15:51:33 +1000 Subject: [PATCH] fix: show disk usage in the top bar alongside CPU and memory The panel monitored CPU and memory and hid storage, so the one resource that fills up silently and takes the machine down with it was the one nobody could see. Storage now shows an icon and a usage bar, matching how memory renders. Every indicator key is set explicitly rather than left to its default, because Astra's storage section is built around throughput rather than usage: the update interval is named "Storage IO", the header graph is an IO graph, and the usage percentage ships off. Taking the defaults would have produced a kB/s readout, not a fullness one. Two things are deliberately NOT configured: storage-main -- the device the bar tracks. Left alone the extension resolves the root filesystem itself and stores a persistent per-disk id, which comes out as an NVMe EUI on a laptop and a QEMU disk id on a VM. Pinning it here would stamp one machine's disk onto every machine. The device allowlist -- there isn't one. Devices are excluded by CLASS instead (loop, ram, zram, sr, fd), which means the same thing on bare metal and in a VM, so whatever real disks a host has are simply what is left. A workstation with snaps installed carries 25 loop devices otherwise. Verified on four hosts. The bar reads the root filesystem and nothing else, and storage-main resolved per host without being told: bare metal to eui.ace42e00...-part5, VMs to 0QEMU_QEMU_HARDDISK_drive-scsi0-part1. --- ansible/roles/soe-gui/tasks/gnome.yml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/ansible/roles/soe-gui/tasks/gnome.yml b/ansible/roles/soe-gui/tasks/gnome.yml index cda68b2..63b1337 100644 --- a/ansible/roles/soe-gui/tasks/gnome.yml +++ b/ansible/roles/soe-gui/tasks/gnome.yml @@ -324,13 +324,34 @@ - has_gnome | default(false) - ansible_facts['distribution'] in ['Ubuntu', 'Fedora'] -- name: Configure Astra Monitor - hide storage +# Storage shows a usage bar, matching the memory indicator. Every key is set +# explicitly because Astra's storage section defaults to throughput instead -- +# the header graph is an IO graph and the usage percentage ships off. +# +# storage-main is deliberately absent: left alone the extension resolves the +# root device itself, which is an nvme id on a laptop and a vda one on a VM. +# +# Devices are ignored by CLASS so the rule holds on bare metal and VMs alike; +# a workstation with snaps carries 25 loop devices. +- name: Configure Astra Monitor - storage usage indicators community.general.dconf: - key: "/org/gnome/shell/extensions/astra-monitor/storage-header-show" - value: "false" + key: "/org/gnome/shell/extensions/astra-monitor/{{ item.key }}" + value: "{{ item.value }}" state: present become: true become_user: "{{ actual_user }}" + loop: + - { key: storage-header-show, value: 'true' } + - { key: storage-header-bars, value: 'true' } + - { key: storage-header-percentage, value: 'false' } + - { key: storage-header-value, value: 'false' } + - { key: storage-header-free, value: 'false' } + - { key: storage-header-io, value: 'false' } + - { key: storage-header-io-bars, value: 'false' } + - { key: storage-header-graph, value: 'false' } + - { key: storage-ignored-regex, value: "'^(loop|ram|zram|sr|fd)[0-9]'" } + loop_control: + label: "{{ item.key }}" tags: ['winlike', 'maclike', 'never'] when: - has_gnome | default(false)