Tie action to "leader press" event? #3421
-
|
As I move through "migrating" my workflow from tmux to wezterm, I am currently exploring the various keybinding setups that I had and what I would like to see in my wezterm flow. One thing that I think would be interesting is an event that is fired for both the start and end of the IE, when leader is pressed, an event is fired, and when the timeout occurs or a subsequent leader chain is completed, an event is fired. Specifically indicating something like "leader start" and "leader end". Why? I think it would be pretty slick to have some sort of indicator in my status bar showing when leader is active (especially if I opt for something like a "no timeout" leader key). I don't know how to accomplish this though as the docs for the leader key binding don't indicate any sort of usable "action" I can call, and indeed adding an action attribute to the leader table does nothing. I attempted the following leader = { key = "a", mods = "CTRL", timeout_milliseconds = 1000, action = wezterm.action.EmitEvent('leader-activated')},but to no avail as the action is not triggered. This is certainly not a "must" have, and I am willing to accept that currently there is no way to do this (in which case this should probably be converted to a very low priority feature request). But I am hoping I am missing something and there is already a mechanism in place for this kind of thing :) Edit: Potentially related issues? Edit 2: Potential solution |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Looks like the potential solution window:leader_is_active() is exactly what I needed :) |
Beta Was this translation helpful? Give feedback.
Looks like the potential solution window:leader_is_active() is exactly what I needed :)