Commit Graph

63 Commits

Author SHA1 Message Date
felixzsh c0d491db29 Document the bar menu and the enable/rescan note 2026-08-11 13:26:32 -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
felixzsh 1b2128e6f1 Keep the bar button glyph in foreground color
active would paint the glyph with the urgent color while running, which
reads backwards for a toggle; dimmed alone is the paused cue.
2026-08-11 11:08:15 -05:00
felixzsh 1f532510a5 Make display options configurable via config.json
The panel reads config.json from its plugin folder (seeded with defaults
on first run, hot-reloaded on save): mode (all | bindings — the bindings
mode only shows combos with a modifier, ideal for keybinding tutorials),
position (keyviz-style alignment, bottom-center by default) and margin,
plus the existing lingerMs. Replaces the hardcoded bottom anchors with
x/y computed from position and margin.
2026-08-11 11:07:47 -05:00
felixzsh bd20dd8a9b Add bar widget to pause and resume the key display
A keyboard glyph in the bar (WidgetButton, right section by default)
toggles a pause flag at $XDG_RUNTIME_DIR/omarchy-key-visualizer.paused that
the panel and every bar widget instance watch, so a click on any monitor
updates all of them. While paused the panel ignores key state and hides;
the button dims. Also exposes pause/resume/toggle over the key-visualizer IPC
target.
2026-08-11 11:06:37 -05:00
felixzsh 7ab4d2f18d Linger on screen after release, keyviz-style
Previously the chips cleared the instant the keys were released, so the
120ms hide delay was invisible. Keep the last combo rendered for the
whole linger window and only clear it when the timer fires, so a quick
tap stays readable (keyviz keeps keys for lingerDurationMs, 5s by
default). Default 1000ms, tunable via lingerMs.
2026-08-11 10:52:54 -05:00
felixzsh 4955c33767 Auto-inject the Hyprland capture hook on plugin load
The capture script must run inside Hyprland's Lua config, but a plugin
cannot register itself in the user-owned hyprland.lua. On first load the
panel appends a small guarded block that dofiles key-visualizer.lua; Hyprland
auto-reloads its config on save, so install is now just add + enable.

The block is idempotent (marker comment), upgrades older plain dofile
lines, and no-ops when the plugin folder is removed so uninstalling never
breaks the config.
2026-08-11 10:11:35 -05:00
felixzsh 64e44c299b Rename plugin id to felixzsh.key-visualizer
omarchy plugin validate rejects the omarchy.* namespace: it is reserved
for first-party plugins. Use the third-party <user>.<name> convention.
2026-08-11 09:58:37 -05:00
felixzsh 96446661b3 Add install and usage docs 2026-08-11 09:53:48 -05:00
felixzsh d0a36e79dd Add key-visualizer panel UI 2026-08-11 09:53:48 -05:00
felixzsh 40bd0dd1f1 Add Hyprland Lua key capture 2026-08-11 09:53:48 -05:00
felixzsh 8cccf21f17 Add plugin manifest 2026-08-11 09:53:48 -05:00
felixzsh 7dcfee467e Add MIT license and gitignore 2026-08-11 09:53:48 -05:00