Commit Graph

10 Commits

Author SHA1 Message Date
felixzsh d1afc68b70 chore: add seconds text to linger label 2026-08-12 08:53:21 -05:00
felixzsh 3d42d0e726 Fix the Linger row layout: fixed-size container, stable field
The hint slot is always reserved on the right (fixed width), the field
keeps a constant width, and the row has a fixed height with everything
vertically centered — the hint no longer sits at the top-right corner
and the field no longer resizes when it appears. Hint text is body size
like the other menu labels.

Align the never-hide hint to the SpinBox center

Anchoring the hint to the row container left it offset whenever the
row's implicit height differed from the field's rendered height. Anchor
to lingerField.field (the NumberField exposes the SpinBox) so the hint
always sits exactly beside the field.

Place the never-hide hint right next to the field

Anchor the hint to the SpinBox's right edge with the field's own height
and vertical center, so it reads as part of the control instead of a
floating label at the row edge.

Rebuild the Linger row as a plain RowLayout

NumberField is a Column (label above the field), and anchoring the hint
to its field alias left the text unanchored when the alias did not
resolve, dumping it at (0,0) over the label. A RowLayout puts label,
field, and hint in the flow, vertically centered by Layout.alignment —
no anchors, no aliases. The field comes first, so the hint never moves
it.

Move the Linger label above the field, Position-style

Label above (caption, bold, darkened — identical to the Dropdown label),
the field pinned to the left half, and the never-hide legend on the
right half via a fill-width spacer, so it appears only at 0 without
moving the field.
2026-08-11 17:19:17 -05:00
felixzsh 0e9adf5a6c Show a 'never hide' hint next to Linger when it is 0
When lingerMs is 0 (always show), a muted caption appears on the right of
the field so the opt-in is visible at a glance; the field shrinks to make
room. Config unchanged.
2026-08-11 16:52:37 -05:00
felixzsh e7232840cb Add a Linger NumberField to the menu
Native qs.Ui.NumberField (SpinBox) for lingerMs: mouse wheel, +/- buttons
and typing, 0-10000ms in 500ms steps, writing config.json like Mode and
Position so the display updates live. 0 selects the always-show behavior
from the previous commit.
2026-08-11 16:23:34 -05:00
felixzsh a22c8eaa78 Replace the position buttons with a native Dropdown (9 placements)
The three Position buttons (Bottom/Top/Center) overlapped the label in
the menu's width. Use qs.Ui.Dropdown with the full 3x3 grid — top /
middle / bottom by left / center / right — the display panel already
positions all of them.
2026-08-11 15:45:40 -05:00
felixzsh 7e079de572 Fix the bar glyph: \uF030C parsed as \uF030 + "C"
JS \u takes exactly 4 hex digits, so \uF030C rendered U+F030 (fa-camera
in the Nerd Font's Font Awesome range) followed by a literal C — a camera
with a trailing c, exactly what was on the bar. U+F030C is in PUA-A and
needs a UTF-16 surrogate pair: \uDB80\uDF0C. Also correct the comment
name (it is md-keyboard, not md-keyboard_outline).
2026-08-11 15:41:22 -05:00
felixzsh 34646dec28 Fix pause toggle: never delete the flag file
The FileView watcher fires on content changes but not on deletion, so
resuming (rm of the flag) left the panel and the menu stuck paused.
Rewrite the flag with 0 or 1 instead, matching the state-file pattern
that already works.
2026-08-11 14:03:12 -05:00
felixzsh f255fa05e9 Fix the Show keys toggle: flip the real paused state
ToggleSwitch does not flip checked on click — it only emits toggled()
and the caller owns the value. Reading !checked there yielded the
current bound state, so setPaused's guard always early-returned and the
toggle never did anything. Flip !root.paused instead; the checked
binding follows the flag file.
2026-08-11 13:58:48 -05:00
felixzsh 5670aca888 Move config out of the plugin dir so edits don't reload the plugin
The shell watches every file under ~/.config/omarchy/plugins/ with
inotify (no extension filter) and reloads all plugin code on any change,
so config.json there made every edit tear down and rebuild the panel and
bar widget. Config now lives at ~/.config/omarchy/key-visualizer.json, which
is not watched: edits update the display live. The panel migrates the
old plugin-dir config (values carried over, file removed) on first load
after the update.
2026-08-11 13:42:24 -05:00
felixzsh 949f41a6be Turn the bar widget into a menu with toggle and display options
Clicking the keyboard glyph now opens a KeyboardPanel popup (the native
bar pattern, e.g. omarchy.audio) instead of toggling pause directly:
Show keys toggle, Mode (all | bindings), and Position (bottom/top/
center). The toggle writes the pause flag and the options write
config.json, both watched by the display panel, so menu and overlay
stay in sync across monitors. Replaces BarWidget.qml with a Panel-based
widget (Panel + BarIconButton + KeyboardPanel).
2026-08-11 13:26:32 -05:00