int...@intelfx.name
unread,Jul 31, 2024, 2:43:38 AM7/31/24Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to tmux-...@googlegroups.com
Hi,
So in tmux there is a number of built-in menus that offer various
actions on a pane or window. The ones I know about are activatable with
a mouse right-click or Prefix+< / Prefix+>. As far as I can see, they
are implemented as built-in bindings that open-code the entire menu
definition as the rhs of the bind-key command.
Now, let's say I'm not satisfied with the default key assignment and
want to rebind those menus to some other key sequence. I see two ways
around it:
1. copy-paste the entire binding into my `.tmux.conf`, changing the lhs
to the key I want;
2. invoke an external script from `.tmux.conf`, which would run `tmux
list-keys -a <original lhs>`, substitute the lhs with the desired key
and eval the result as a tmux command.
The solution (1) has a downside of hard-coding the menu definition into
my .tmux.conf, which means that if the menu definition is ever changed
upstream, I won't get the updated one, and the solution (2) has a
downside of being non-idempotent (i.e. it will mess everything up if I
ever reload .tmux.conf) as well as a downside of being a giant hack.
What is the preferred way to do what I want? If there isn't one,
perhaps it could be considered an RFE to make one?
Thanks,
--
Ivan Shapovalov / intelfx /