Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Leader key (Prefix) when configuring bindings #415

Open
benbooth493 opened this issue Jan 16, 2024 · 9 comments · May be fixed by #699
Open

Add support for Leader key (Prefix) when configuring bindings #415

benbooth493 opened this issue Jan 16, 2024 · 9 comments · May be fixed by #699
Assignees
Labels
good first issue Good for newcomers wishlist Features wishlist

Comments

@benbooth493
Copy link

benbooth493 commented Jan 16, 2024

Similar to Wezterm it would be good to support a Leader/Prefix key.
This would allow the emulation of tmux behaviour when using native window and pane management.

For example:
CTRL-B C will create a new window

@benbooth493 benbooth493 changed the title Add support for Leader key when configuring bindings Add support for Leader key (Prefix) when configuring bindings Jan 16, 2024
@raphamorim
Copy link
Owner

Hey there! thanks for the issue @benbooth493 , I think it's a good idea and might be a good issue for beginners. Marking as wishlist and good for beginners.

@raphamorim raphamorim added good first issue Good for newcomers wishlist Features wishlist labels Jan 22, 2024
@orhun
Copy link
Contributor

orhun commented Sep 21, 2024

I will give this one a shot, can you assign it to me?

@raphamorim
Copy link
Owner

will do right now 👌

@orhun
Copy link
Contributor

orhun commented Sep 23, 2024

Based on Wezterm's leader key configuration, I'm thinking of something like:

[bindings]
leader = { key = "b", with = "control" }
keys = [
  { key = "c", mode = "leader", action = "createtab" },
]

Thoughts?

@raphamorim
Copy link
Owner

Looks good, but I think also should allow to configure the timeout on leader key

@orhun
Copy link
Contributor

orhun commented Sep 23, 2024

Good point. I'm kind of stuck at the part where the leader key should activate the BindingMode::LEADER. Can you give me some pointers about how this might work?

@orhun
Copy link
Contributor

orhun commented Sep 29, 2024

FWIW I pushed my WIP changes to https://github.com/orhun/rio/tree/feat/leader-key

@raphamorim
Copy link
Owner

@orhun could you open a PR? Gets easier to make comments. I think you are going in the right way but shouldn't make any change on rio-backend/src/crosswords/mod.rs file

@orhun orhun linked a pull request Oct 8, 2024 that will close this issue
@orhun
Copy link
Contributor

orhun commented Oct 8, 2024

#699

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers wishlist Features wishlist
Projects
Development

Successfully merging a pull request may close this issue.

3 participants