I left tmux for zellij after several unsuccessful attempts to get Shift+Enter working. Was quite impressed initially and invested weeks in building new muscle memory, but somehow Zellij crashed with panic more than once, leaving all my processes orphaned. Decided to go back to tmux, and found a simple fix for my Shift+Enter issue. In case anyone is looking for it, the fix is "bind-key -T root S-Enter send-keys C-j" b…
Interesting, for me `shift+enter` hasnt worked, but `option+enter` does give me new lines in Claude Code's promptbox inside tmux on MacOS.
Make tmux pretty and usable (2024)
121–130 of 285 posts
Re: Make tmux pretty and usable (2024)
#122Earlier quoted context omitted.
Do you have a "dot files" repo? It would contain things like this, config files for tmux, zsh, , etc.
That may work for a server or two but doesn't really pan out for fleet management.
I had a friend that even had his public keys added to the /root/.ssh/ but I didin't go that far -I didn't even put my own .emacs out - but I at least could use good tools to look at the tcpdump output or giant log files if needed. "Eight Megs and Constantly Swapping" is not that big of a deal anymore.
And if people want to just use some default open source image, just point out that in modern cloud environments, you don't want each node to customize itself, you want to pre-run that process one time per node type in your "directed graph of image delta pipelines" which takes the input image and publishes the cloud ready app-specific images (with your DNS configs, LDAP integration, whatever, plus emacs/neovim and screen/tmux :)
Re: Make tmux pretty and usable (2024)
#123 bind-key -n M-n new-window
bind-key -n M-1 select-window -t :1
bind-key -n M-2 select-window -t :2
bind-key -n M-3 select-window -t :3
bind-key -n M-4 select-window -t :4
bind-key -n M-5 select-window -t :5
bind-key -n M-6 select-window -t :6
bind-key -n M-7 select-window -t :7
bind-key -n M-8 select-window -t :8
bind-key -n M-9 select-window -t :9
To switch around quick. So on my system I've got Super-{1-9} for workspaces, Alt-{1-9} for tmux panes.Also if you want a vi-like copy mode (where you can select and copy stuff) that opens using Alt-/:
bind-key -n M-/ copy-mode
set -g status-keys vi
set-window-option -g mode-keys vi
# v to trigger selection
bind-key -T copy-mode-vi v send-keys -X begin-selection
# wl-copy if you use wayland
# mouse selection in copy mode to copy
bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "wl-copy"
# y to copy
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy"
And btw, Ctrl-Shift-v to paste system clipboardYou can also put the config into ~/.config/tmux/tmux.conf
edit: And if you want a powerline-style design:
set -g pane-border-style "fg=colour252"
set -g pane-active-border-style "fg=colour25"
set -g status-style "bg=default,fg=default"
set -g status-left "#[fg=colour231,bg=colour25,bold] #S #[fg=colour25,bg=default,nobold]"
set -g status-right "#[fg=colour67,bg=default]#[fg=colour231,bg=colour67] %Y-%m-%d %H:%M #[fg=colour25,bg=colour67]#[fg=colour231,bg=colour25,bold] #h "
setw -g window-status-format "#[fg=colour243,bg=default] #I #W "
setw -g window-status-current-format "#[fg=colour28,bg=default,reverse]#[fg=colour231,bg=colour28,bold,noreverse] #I #W #[fg=colour28,bg=default,noreverse]"
Requires powerline-fontsRe: Make tmux pretty and usable (2024)
#124Guys, did you know about tmux control mode? It tells the host terminal to treat tmux tabs as actual tabs in the terminal. That means that things like scrollback, tab navigation, copy paste, keyboard shortcuts, etc are all handled natively, and you can visually see all your tmux tabs! It doesn't have great support across all terminals, but it does work great in iTerm 2. Try `tmux -CC` in iTerm. For a tmux novice like…
this is the only reason i use a mac and in a decade no open source linux terminal has ever implemented this to my knowledge
I actually don’t like control mode much though. It’s a terrible protocol. Absolutely abysmal design which leads to a plethora of edge case bugs.
At some point I’ll replace tmux control mode entirely but for the moment it solves the immediate problem.
Re: Make tmux pretty and usable (2024)
#125I gave up on it once I discovered https://zellij.dev/ Just even for how tab and panes are setup, and how it's good for scrolling and text selection with your mouse for copy pasting.
Zellij is close to 50 megabytes, but tmux and all dependent libraries (minus libc, it's always there) is about 2 megabytes.
Re: Make tmux pretty and usable (2024)
#126 unbind C-b
set-option -g prefix C-Space
bind-key C-Space send-prefixRe: Make tmux pretty and usable (2024)
#127Earlier quoted context omitted.
I used tmux for a few years, until one day I discovered Zellij. With its significantly better UI and overall user experience, I was instantly convinced.
i tried both and i honestly... i didn't see anything different. i want tmux for three things: 1. easy splits 2. easy scrollback 3. being able to restart a session if my terminal dies given all that, tmux works exactly as expected. what are all these "significantly better ui and overall ux"?
For them, there's as much variety of desires as for any other window manager, and there are tons of those. But terminal ones are usually significantly easier to configure in wild ways due to having fewer (but more powerful) knobs to tweak, so a fair number choose just one and configure the heck out of it.
Re: Make tmux pretty and usable (2024)
#128Disconnecting a session's lifetime from the connection's lifetime hardly need such lengthy tutorial.
And displaying and arranging multiple virtual terminals was supposed to be the job of the terminal emulator and the windowing system.
Re: Make tmux pretty and usable (2024)
#129I gave up on it once I discovered https://zellij.dev/ Just even for how tab and panes are setup, and how it's good for scrolling and text selection with your mouse for copy pasting.
I tried zellij a couple of years ago when it first got popular and it didn't click for me.
Re: Make tmux pretty and usable (2024)
#130I gave up on it once I discovered https://zellij.dev/ Just even for how tab and panes are setup, and how it's good for scrolling and text selection with your mouse for copy pasting.
This sentiment seems to be shared widely. Is there a good conversion guide for tmux users? I tried zellij a couple of years ago when it first got popular and it didn't click for me.