You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bug Fixes
Sidebar no longer disrupts other apps. Clicks in the sidebar region are only intercepted when iTerm2 is the frontmost application and the sidebar is visible. Previously, the canvas silently absorbed clicks across all apps.
Sidebar visibility properly tracked. Replaced unreliable hs.canvas:isVisible() with an explicit _sidebarVisible flag, fixing the bug where the hidden canvas still consumed mouse events.
Sidebar z-order restored on focus return. Uses hs.application.watcher to set the canvas to floating level when iTerm activates and drop to normal level when another app takes focus. Previously, switching away and back via Mission Control left the canvas stuck behind other windows.
Graceful error handling. Wrapped isITerm(), buildSidebar(), and filesystem operations in pcall to prevent cascading failures.
New Features
Bell flash notification. Windows with a bell indicator (🔔) now flash with a separate configurable color and interval (config.bell). Previously, only Claude Code "waiting" state triggered a flash with a hardcoded color.
Consolidated flash timer. Replaced per-window flash timers with a single shared timer, reducing resource usage.
Path-keyed custom names. Window renames can now be keyed by working directory path, so the same name persists across sessions for the same project even if the window ID changes.
Persistent window ordering and names. Custom window order and renames are saved to hs.settings and restored across reloads and restarts.
Space change handling. Added hs.spaces.watcher to detect macOS Space changes and rebuild/retile accordingly.
Canvas level polling. Periodic 1-second timer ensures the canvas level stays correct even when Hammerspoon misses a focus event.
Sidebar build optimization. Snapshot diffing avoids full canvas rebuilds when window structure hasn't changed; uses in-place element attribute updates instead. Debounced rebuilds coalesce rapid successive events.
Refactoring
buildSidebar split into public buildSidebar (snapshot + debounce) and private _doBuildSidebar (actual canvas manipulation).
startFlashing now accepts a flashType parameter ("waiting" or "bell") instead of having a single hardcoded behavior.
OpenCode data finalization extracted into _finalizeOpenCodeData().