Commit Graph

6 Commits

Author SHA1 Message Date
felixzsh 48af33c2a7 fix(security): use POSIX-only checks in runtime dir validation 2026-08-26 18:47:29 -05:00
felixzsh 89cd794708 fix(security): fail-closed XDG_RUNTIME_DIR and harden state file writes
Remove predictable /tmp/omarchy-key-visualizer.json fallback that exposed
captured key combinations and allowed symlink redirection when
XDG_RUNTIME_DIR is absent. Introduce fail-closed behaviour: disable
capture if XDG_RUNTIME_DIR is missing, equals /tmp, is not absolute,
not owned or not 0700.

Add secure_write with O_NOFOLLOW mitigation (test ! -L), atomic
tmp+rename and chmod 600 to prevent world-readable leaks and TOCTOU
races. Apply same guard to QML statePath/superPath and Panel nudge
writes (umask 077, chmod 600, symlink check).

Fixes security review at 790b07c0c9:
key-visualizer.lua:15-17,141-145
2026-08-24 14:00:12 -05:00
felixzsh aa11f5f7a2 feat: drag and drop keyvisualizer 2026-08-20 10:39:32 -05:00
felixzsh cabdf1307c Treat key combinations as a unit (combos)
The display now only updates on key-down (the combo grows as you press)
and when the last key is released (the empty payload starts the linger
with the last full combo). Intermediate releases no longer shrink the
display, so the order you let go of a shortcut doesn't matter: Ctrl+Shift+N
stays Ctrl+Shift+N whether Ctrl, Shift, or N goes up first, and the 1s
linger shows the full combo instead of a partial release state. Matches
the keybinding-tutorial use case better than keyviz, which shrinks
key-by-key on spaced releases.
2026-08-11 14:57:45 -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 40bd0dd1f1 Add Hyprland Lua key capture 2026-08-11 09:53:48 -05:00