-
-
Notifications
You must be signed in to change notification settings - Fork 756
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
Question: Toggle leader key binding #656
Comments
Take a look at window:set_config_overrides; that shows how you can override the configuration for a window by pressing a key assignment of your choice. You could modify that example to change the |
That's perfect! Thank you again. |
I've been trying to implement this, and to me (naively) it doesn't appear that I tested with:
And I get the following error:
If I change:
to
I get
I get:
|
You can drill into the leader value: leader = {
key={Char="s"},
} so you could test which value it is using: if effective.leader.key.Char == "s" then
-- it's your baseline config
else
-- it's something else
fi alternatively, you can instead just look at the overrides: local overrides = window:get_config_overrides() or {}
if not overrides.leader then
-- no override set, so use alternative leader
overrides.leader = {key="a", mods="CTRL"}
else
-- switch back to main leader config by clearing override
overrides.leader = nil
end
window:set_config_overrides(overrides) |
I think that lines up with what I have:
The logs show the following
The result of |
This gets more interesting, I copied and pasted your code above, and used the comments as
I have
The following log output shows:
|
This is fixed now in |
Thank you. I just tested this out and it seems to be working as expected. I think I can use a similar pattern to active copy mode and in doing so set |
Alright, let's call this closed! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I've been migrating my tmux settings directly into wezterm, but I haven't been able to find if there is a solution to this.
I've set my leader key with:
This is the same leader key I use in tmux. Some times I need to open up tmux inside of wezterm and and have the leader key sent to it. Right now my solution is to edit the wezterm configuration and comment that line out, then uncomment it when I'm done. This does not seem ideal.
With tmux when I would connect to a remote session and open tmux again (nested), I have F12 bound to switching the leader key target between inner and outer tmux sessions. Is it possible to set up a binding like that?
The text was updated successfully, but these errors were encountered: