I must admit I'm a screen guy. I feel not at home when I find a system without screen and I miss the "killer feature" of connecting to any tty at any baud rate
screen /dev/ttyUSB0 9600
in tmux. But recently I tried to switch to tmux and found a few useful configurations.1) I have alacritty as a terminal so no scrollback and no tabs (yeah there is a scrollback branch, but why duplicate functionality?) So my default setup right now is that alacritty (I use i3 so alacritty is bound to meta+enter) opens with this line (this way only one terminal can be opened and has always the same state)
tmux attach -d -t alacritty || tmux new -s alacritty
So I got scrollback and tabs. Also I added bind-key -n C-t new-window
bind-key -n C-PPage previous-window
bind-key -n C-NPage next-window
to the config so I can use it like any normal terminal with ctrl+t (new tab) and ctrl + pgup/down to switch between them. In theory I could even add shift with (C-S-t), but this somehow doesn't work for me and I found conflicting information on it and some outdated infos so I just stopped looking.The second configuration that I like to use is what everybody uses
2)
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
to change the prefix to the sane ctrl+a screen default.Also setting colors is a must for neomutt and co
set -g default-terminal "tmux-256color"
I'm still experimenting with configs for my desktops and servers, but I'm feeling a bit more at home with tmux right now.Oh and for anyone who doesn't know of byobu check it out http://byobu.co/ it's a wrapper around screen and/or tmux and is easy for beginners and a nice change for everybody else.