aboutsummaryrefslogtreecommitdiffstats
path: root/vm-manager/Stat.qml
AgeCommit message (Collapse)AuthorFilesLines
27 hoursfeat(vm-manager): libvirt VM drawerDanilo M.1-0/+44
A top drawer on the secondary monitor showing every libvirt machine: its state, live statistics while it runs, the actions that make sense in that state, and the snapshot list. SUPER+v toggles it over IPC. This replaces the menu half of rofi-qemu.sh, which is still in ~/bin but no longer bound. A dmenu row can only ever be a string, so the script could not show what a machine is actually doing, and the snapshots it could create were never listed anywhere. Everything shells out to virsh, the same commands the script used, so there is no libvirt binding and no new dependency. State changes arrive by `virsh event --all --loop` rather than polling, which means a machine started from virt-manager or the CLI updates the drawer too. Statistics do need a 2 second timer, but it only runs while the drawer is open. Memory, filesystem usage and the address come from qemu-guest-agent, so they are absent for the first seconds after boot and on any machine without the agent. Those rows show a dash rather than falling back to libvirt's own figures: balloon.current is memory allocated rather than used and reads full forever, and block.allocation is qcow2 growth on the host rather than usage inside the guest. Either would be quietly wrong. Destructive actions are gated, which the rofi version did not do at all: Delete VM requires the name typed, since it runs undefine with --remove-all-storage and erases the disk image, and reset, force stop, snapshot revert and snapshot delete each take a confirmation click. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G7NRsGyF9jGfPYS4zPqpN7