Skip to content

Add command sequencer for bind rules#160

Open
nullun wants to merge 2 commits intotypester:mainfrom
nullun:feature/bind-sequences
Open

Add command sequencer for bind rules#160
nullun wants to merge 2 commits intotypester:mainfrom
nullun:feature/bind-sequences

Conversation

@nullun
Copy link

@nullun nullun commented Feb 27, 2026

Multiple bind commands for the same hotkey now stack into a sequence that executes all commands in order. This allows users to create complex keybindings by chaining multiple actions together. Whilst I haven't fully tested the new keybinding mode system, there is a test that demonstrates separation of sequences in different modes.

Usage:
yashiki bind alt-shift-o output-send next
yashiki bind alt-shift-o output-focus next
# alt-shift-o now executes both commands in order

Implementation:

  • Add Command::Sequence variant to yashiki-ipc
  • Update HotkeyManager::bind to create sequences automatically
  • Add sequence execution to process_command with fail-fast behavior
  • Add comprehensive tests for sequence creation and execution

Features:

  • Commands execute in bind order
  • Each command sees state changes from previous commands
  • Sequence stops on first error (fail-fast)
  • Single unbind removes entire sequence
  • Backward compatible (no CLI changes)

Multiple bind commands for the same hotkey now stack into a sequence
that executes all commands in order. This allows users to create
complex keybindings by chaining multiple actions together.

Usage:
  yashiki bind alt-x window-close
  yashiki bind alt-x tag-view 2
  yashiki bind alt-x retile
  # alt-x now executes all three commands in order

Implementation:
- Add Command::Sequence variant to yashiki-ipc
- Update HotkeyManager::bind to create sequences automatically
- Add sequence execution to process_command with fail-fast behavior
- Add comprehensive tests for sequence creation and execution

Features:
- Commands execute in bind order
- Each command sees state changes from previous commands
- Sequence stops on first error (fail-fast)
- Single unbind removes entire sequence
- Backward compatible (no CLI changes)
@nullun nullun force-pushed the feature/bind-sequences branch from e02821b to 7506599 Compare February 27, 2026 12:16
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