goodbye Zellij
After a brief foray into using Zellij, I dropped it a while back and have continued to use tmux.
Turns out my favorable view of Zellij is mostly based on decent default key bindings. I thought I'd miss the stack -- which I did like and didn't find a decent way to do in tmux -- but it's been months and I haven't missed it yet.
The stack in zellij is layout mode where a master pane is displayed on one side and the other size (when there are more than two windows) displays another pane and all the rest of the panes are stacked, with order preserved. That's hard to get across without a screenshot.
I drifted away from Zellij due to lack of status bar and control over appearance. Theoretically there are add-ons for it, but it wasn't straightforward and the setup for tmux requires no add-ons for this basic functionality.
I now borrow heavily from the key bindings in Zellij for my tmux configuration.
I dropped the use of the prefix in favor of alt/meta for things I do frequently.
For example, toggling the zoom is now alt+f, cycling windows is now alt+\[ or alt+\]. I experimented with alt+x and alt+v for enter selection mode and pasting the buffer, respectively, but it didn't stick. I'm not even sure those were the bindings I picked, I can't recall.
Relevant configuration bits:
T282828
set -g mode-keys vi
set -sg escape-time 0
set -g prefix C-b
Tc9d1d9# prefix then hjkl to move in that direction
Tc9d1d9# but don't wrap past it
bind -n M-h if -F '#{pane_at_left}' "" 'select-pane -L'
bind -n M-j if -F '#{pane_at_bottom}' "" 'select-pane -D'
bind -n M-k if -F '#{pane_at_top}' "" 'select-pane -U'
bind -n M-l if -F '#{pane_at_right}' "" 'select-pane -R'
bind -n M-] next-window
bind -n M-[ previous-window
Tc9d1d9# convert new window keys to use same working directory
bind -n M-"'" split-window -v -c "#{pane_current_path}"
bind -n M-5 split-window -h -c "#{pane_current_path}"
bind-key -n 'M-f' resize-pane -Z
I do need to have T383838escape-time set to T3838380 for tmux so that my vi-keys in Bash work as expected and so that tmux doesn't think I'm trying to switch panes when I'm really telling Bash to do stuff.
Tags: index, tmux, cli
Tags
Navigation
Backlinks