DEV Community

Discussion on: May 13th, 2021: What did you learn this week?

Collapse
 
vonheikemen profile image
Heiker

I found out about key-tables in tmux.

Funny thing, I basically have no space for keyboard shortcurts when using tmux so... key-tables to the rescue. This is like a hacky way of having yet another "prefix key" which can trigger another set of actions.

For the moment I only have one custom key-table with two shortcuts.

# Ctrl+b changes the key-table to `x2`
bind -T root C-b switch-client -T x2

# `Ctrl + b` then press 1 to go the session with the name main 
bind -T x2 1 switch-client -t main

# `Ctrl + b` then press 2 to go the session with the name pomodoro 
bind -T x2 2 switch-client -t pomodoro
Enter fullscreen mode Exit fullscreen mode
Collapse
 
nickytonline profile image
Nick Taylor

Awesome!

Hackerman from Kung Fury putting on a Nintendo Power glove