From 69e6ce2bf7272797cf08ee4fbe0ff9fe0fc3b1f4 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 13 Nov 2026 20:34:47 +0100 Subject: feat(vm): a VMs tab for libvirt power, snapshots and ssh virsh domstats each poll for state, CPU and memory; managed save, snapshots and the guest agent's IP in a thread every 10s. Actions are the drawer's power set plus snapshot take/revert/delete, names checked against the last state. SSH opens a tab in a running kitty over its remote-control socket and focuses it, else spawns kitty. Destructive buttons are press and hold. Co-Authored-By: Claude Opus 5.5 --- static/deck.css | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'static/deck.css') diff --git a/static/deck.css b/static/deck.css index a08f037..c316ff3 100644 --- a/static/deck.css +++ b/static/deck.css @@ -812,3 +812,24 @@ select { /* Hyprland: speed 30 * 100 ms, flatlinetwo = linear, style = loop */ animation: border-rotate 3s linear infinite; } + +/* VMs tab. Destructive buttons are press and hold, filled over --hold. */ +.vm-list { display: flex; flex-direction: column; gap: 12px; padding: 4px 2px; } +.vm-list[hidden], .vm-off[hidden], .vm-use[hidden], .vm-err[hidden] { display: none; } +.vm-card { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--udt-surface0); } +.vm-card.busy { opacity: .6; pointer-events: none; } +.vm-head { display: flex; align-items: center; gap: 12px; } +.vm-name { font-size: 1.286rem; font-weight: 600; } +.vm-state { padding: 2px 10px; border-radius: 999px; background: var(--udt-surface2); font-size: 0.857rem; } +.vm-state.good { background: var(--udt-green); color: var(--udt-crust); } +.vm-state.warn { background: var(--udt-yellow); color: var(--udt-crust); } +.vm-state.bad { background: var(--udt-red); color: var(--udt-crust); } +.vm-ip { margin-left: auto; color: var(--udt-subtext0); } +.vm-use { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 10px; } +.vm-err { color: var(--udt-red); font-size: 0.857rem; } +.vm-acts { margin-bottom: 0; } +.vm-snap { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid var(--udt-surface1); } +.vm-snap > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.vm .hold { position: relative; overflow: hidden; isolation: isolate; border-color: var(--udt-red); touch-action: none; } +.vm .hold::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--udt-red); transform: scaleX(0); transform-origin: left; } +.vm .hold.holding::before { transform: scaleX(1); transition: transform var(--hold, 800ms) linear; } -- cgit v1.2.3