Skip to content

feat!: add keybinding mode system (river-style)#157

Merged
typester merged 2 commits intomainfrom
feat/bind-mode
Feb 25, 2026
Merged

feat!: add keybinding mode system (river-style)#157
typester merged 2 commits intomainfrom
feat/bind-mode

Conversation

@typester
Copy link
Owner

Add modal keybinding support inspired by river (Wayland compositor). Bindings are scoped to named modes, and only the current mode's bindings are active. This enables patterns like resize mode, launcher mode, or passthrough mode.

New commands: declare-mode, enter-mode, get-mode
Modified commands: bind (--mode), unbind (--mode), list-bindings (--mode)
Default mode: "normal" (always exists, implicit)

Design: CGEventTap callback captures all modes' bindings at tap creation and reads current mode via Arc<RwLock> at runtime. enter_mode() only updates the RwLock (no tap rebuild). bind()/unbind() set dirty flag for tap rebuild.

Also adds ModeChanged event to state streaming, mode field to Snapshot and StateInfo, and updates zsh completions and documentation.

ref #154

Add modal keybinding support inspired by river (Wayland compositor).
Bindings are scoped to named modes, and only the current mode's bindings
are active. This enables patterns like resize mode, launcher mode, or
passthrough mode.

New commands: declare-mode, enter-mode, get-mode
Modified commands: bind (--mode), unbind (--mode), list-bindings (--mode)
Default mode: "normal" (always exists, implicit)

Design: CGEventTap callback captures all modes' bindings at tap creation
and reads current mode via Arc<RwLock<String>> at runtime. enter_mode()
only updates the RwLock (no tap rebuild). bind()/unbind() set dirty flag
for tap rebuild.

Also adds ModeChanged event to state streaming, mode field to Snapshot
and StateInfo, and updates zsh completions and documentation.

ref #154
@typester typester changed the title feat: add keybinding mode system (river-style) feat!: add keybinding mode system (river-style) Feb 25, 2026
@typester typester merged commit b13d30a into main Feb 25, 2026
2 checks passed
@typester typester deleted the feat/bind-mode branch February 25, 2026 02:20
@github-actions github-actions bot mentioned this pull request Feb 25, 2026
@typester typester mentioned this pull request Feb 25, 2026
typester pushed a commit that referenced this pull request Feb 25, 2026
## 🤖 New release

* `yashiki-ipc`: 0.11.6 -> 0.12.0
* `yashiki`: 0.11.6 -> 0.12.0
* `yashiki-layout-tatami`: 0.11.6 -> 0.12.0
* `yashiki-layout-byobu`: 0.11.6 -> 0.12.0

<details><summary><i><b>Changelog</b></i></summary><p>

## `yashiki-ipc`

<blockquote>

##
[0.12.0](yashiki-ipc-v0.11.6...yashiki-ipc-v0.12.0)
- 2026-02-25

### Added

- [**breaking**] add keybinding mode system (river-style)
([#157](#157))
</blockquote>

## `yashiki`

<blockquote>

##
[0.12.0](yashiki-v0.11.6...yashiki-v0.12.0)
- 2026-02-25

### Added

- [**breaking**] add keybinding mode system (river-style)
([#157](#157))
- update focused_display via auto-raise when cursor moves to different
display ([#156](#156))

### Fixed

- call activate_application for already-frontmost apps to fix keyboard
focus ([#155](#155))
</blockquote>

## `yashiki-layout-tatami`

<blockquote>

##
[0.7.3](yashiki-layout-tatami-v0.7.2...yashiki-layout-tatami-v0.7.3)
- 2026-01-20

### Other

- update Cargo.lock dependencies
</blockquote>

## `yashiki-layout-byobu`

<blockquote>

##
[0.7.3](yashiki-layout-byobu-v0.7.2...yashiki-layout-byobu-v0.7.3)
- 2026-01-20

### Other

- update Cargo.lock dependencies
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant