Using hotkeys to move between tmux panes
- Dominant language
- C
- Stars
- 8.1k
- Forks
- 241
- PR merge metrics
- No merged PRs in 30d
Description
I'd like to use the same keys I use to switch focus between windows (`alt - up`, `alt - down` etc...)
to switch focus between tmux panes.
Now I don't know if this is a): possible at all, and b): something to be handled by skhd, but I'll try to explain what I do now and hopefully someone can put me on the right track.
Switching focus between tmux panes is done by pressing the prefix key, by default `ctrl - b`, followed by the arrow key (up, down etc...) corresponding with the direction of the window one wants to focus.
Instead of pressing ctrl-b and an arrow key all the time, in my alacritty config file I have set a key binding so that when I press, for example, `cmd + alt - up`, alacritty sends the code `\x02\x1b\x5b\x41`, which corresponds to `ctrl - b` followed by an up arrow.
So to switch between windows I need to press `alt - up` and to switch between panes I need to press `cmd + alt - up`. While this is an improvement from the default way, it's still counterintuitive.
Is there a way to implement this?
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue does not name a source file, test, or implementation entry point. Start by tracing how skhd handles key bindings on macOS and compare that with the alacritty key sequence described; done means establishing whether the requested direct hotkeys can be supported and documenting or implementing a clear behavior for switching tmux panes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, macos
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100