diff options
Diffstat (limited to 'desktop/modules')
| -rw-r--r-- | desktop/modules/mail/README.md | 6 | ||||
| -rwxr-xr-x | desktop/modules/mail/waybar-mail.sh | 2 | ||||
| -rw-r--r-- | desktop/modules/vm/README.md | 23 | ||||
| -rw-r--r-- | desktop/modules/vm/VmPage.qml | 4 |
4 files changed, 21 insertions, 14 deletions
diff --git a/desktop/modules/mail/README.md b/desktop/modules/mail/README.md index 8ae2bd2..92e4dab 100644 --- a/desktop/modules/mail/README.md +++ b/desktop/modules/mail/README.md @@ -244,9 +244,9 @@ is not worth a timer. ## Theme and blur -`Theme.qml` is the shared one: the palette comes from -`~/.cache/wal/udt-palette.qml` and is watched. It is a fourth identical copy, -which is a known loose end, not a palette to grow. +`Theme.qml` is a symlink to `shared/Theme.qml`: the palette comes from +`~/.cache/wal/udt-palette.qml` and is watched. Sharing one file is what keeps +the palette from drifting into per-component copies. Frosting is Hyprland's, matched on this window's namespace: diff --git a/desktop/modules/mail/waybar-mail.sh b/desktop/modules/mail/waybar-mail.sh index 4942f54..207a86e 100755 --- a/desktop/modules/mail/waybar-mail.sh +++ b/desktop/modules/mail/waybar-mail.sh @@ -16,7 +16,7 @@ # which is why there is no daemon to supervise and no interval to tune. # # The count is the total across every account. A per account breakdown is the -# drawer's job; see modules/mail/README.md. +# drawer's job; see desktop/modules/mail/README.md. set -u diff --git a/desktop/modules/vm/README.md b/desktop/modules/vm/README.md index 79c60f5..fbb7bde 100644 --- a/desktop/modules/vm/README.md +++ b/desktop/modules/vm/README.md @@ -38,10 +38,9 @@ Write those two paths out in full in the real config: `exec_cmd` runs the command directly, with no shell to expand `~`. The drawer opens on the monitor named by the `monitor` property at the top of -`VmPanel.qml`, defaulting to `DP-3`, and falls back to the first screen when -that one is not connected. It dims the rest of that monitor, because the -secondary screen usually has a real window on it, and takes keyboard focus so -Escape closes it and a delete can be confirmed by typing. +`Drawer.qml`, defaulting to `DP-1`, and falls back to the first screen when +that one is not connected. It takes keyboard focus so Escape closes it and a +delete can be confirmed by typing. ## Where the numbers come from @@ -73,9 +72,11 @@ for the whole session, panel open or not. Starting a VM from `virsh` or virt-manager updates the drawer, and opening it shows current state rather than whatever was true last time. -Statistics do need sampling, on a 2 second timer, but only while the drawer -is open: `Virsh.sampling` follows the panel's `open`. A closed panel costs one -idle process waiting on an event socket. +Statistics do need sampling, on a 2 second timer, but only while the vm page +is constructed: `Virsh.sampling` follows the page, set in the page's +`Component.onCompleted` and cleared in `Component.onDestruction`. The page is +lazily loaded, so a closed page costs one idle process waiting on an event +socket. ## Two things that bite @@ -87,9 +88,11 @@ the key then has nothing to talk to and silently does nothing. **Key events reach an item, not a window.** Setting `keyboardFocus` on the layer shell is necessary but not sufficient: `Keys.onEscapePressed` on the -PanelWindow itself never fires, because no item inside holds focus. A filled -`Item` with `focus: true` catches it, and takes focus back when the TextInput -in a delete confirmation gives it up. +PanelWindow itself never fires, because no item inside holds focus. The panel +rectangle is focused as the ancestor of the page content, so a key from any +focused descendant bubbles up to it. The delete confirmation's `TextInput` +also handles Escape itself, cancelling the pending confirmation rather than +navigating away. ## Destructive actions diff --git a/desktop/modules/vm/VmPage.qml b/desktop/modules/vm/VmPage.qml index 5cb4dc7..9fca5f5 100644 --- a/desktop/modules/vm/VmPage.qml +++ b/desktop/modules/vm/VmPage.qml @@ -318,6 +318,10 @@ Column { focus: needsTyping Component.onCompleted: if (needsTyping) forceActiveFocus() + // Escape cancels the pending confirmation rather than + // navigating away from the page; this handler consumes the key. + Keys.onEscapePressed: { page.confirming = null; page.typed = ""; } + Rectangle { anchors.fill: parent anchors.margins: -6 |
