aboutsummaryrefslogtreecommitdiffstats
path: root/vm-manager
AgeCommit message (Collapse)AuthorFilesLines
10 hoursfeat(vm-manager): offer to discard a saved state that will not restoreDanilo M.3-5/+66
A VM saved rather than shut down restores its memory image on the next start. When that image cannot be restored the start fails every time with "unable to execute QEMU command 'migrate-incoming'", and the panel showed an ordinary "shut off" with a Start button that could never work. Detection is virsh dominfo grepped for "Managed save: yes", polled per VM on every list refresh the way the agent rows are. domstats does not report it: the shut-off reason reads "failed", from the failed start, not from the save. virsh list --all --managed-save does print "saved" in the state column, but not together with --name, which is the form the panel lists with. The button appears only when a saved image exists, since managedsave-remove fails without one and would be noise on every other VM. It takes a confirmation click but not a typed name: it deletes the memory image and leaves the disk alone, so the cost of a misclick is a cold boot. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lo1FG4qTr1inavmhqhfobe
34 hoursrefactor: one Theme.qml in shared/, symlinked from each componentDanilo M.1-64/+1
The four copies had already drifted, which is the argument for doing this now rather than when a palette change has to be made four times and lands in three of them. vm-manager was missing surfaceAlt; volume-osd was missing green, yellow and surfaceAlt. The shared file is the superset, so the two thin ones gain properties they never had and nothing loses one. A symlink rather than a shared import path: a singleton outside the config directory needs a qmldir beside it, the same friction that already keeps the generated palette parsed rather than imported. Quickshell follows the link and resolves the singleton with no qmldir, so no consumer changes and no component stops running standalone under qs -p. All four load clean with Configuration Loaded and no QML resolution error. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TvHeJEXJzdfAaCCYqURAWp
2 daysfix(vm-manager): close on Escape, and stay runningDanilo M.2-1/+48
Two bugs that both looked like the panel ignoring input. Escape did nothing despite the panel saying it closes. Keys.onEscapePressed was on the PanelWindow, and key events go to a focused item rather than to a window, so it never fired. A filled Item with focus: true now catches it and reclaims focus when a delete confirmation's TextInput releases it. The shell also exited whenever the drawer was closed, which is most of the time: with the LazyLoader inactive there is no visible window, and quickshell quits at that point. Since the keybind reaches the panel over IPC, that left the key talking to nothing. Same 1x1 transparent keepalive window as volume-osd, for the same reason. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G7NRsGyF9jGfPYS4zPqpN7
2 daysrefactor(theme): read the palette from unified-desktop-themeDanilo M.2-18/+37
Both components had their own copy of the Macchiato colours, and the second copy appeared the moment there was a second component. Editing the palette meant editing it in as many places as there were shells, and they would have drifted. They now read ~/.cache/wal/udt-palette.qml, which udt-accent generates from unified-desktop-theme's palette.rasi. The file is watched, so a palette change reaches a running shell in place, the same way the accent already did. What is left in Theme.qml is a fallback, used before the file has been read and on a machine where unified-desktop-theme is not installed, which is what keeps each directory runnable on its own. The file is parsed rather than imported: a generated QML singleton cannot be imported without a qmldir beside it, and the wal cache has no reason to carry one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G7NRsGyF9jGfPYS4zPqpN7
2 daysfeat(vm-manager): libvirt VM drawerDanilo M.7-0/+998
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