As usual, I want to learn something so I'm going to write about it. Hopefully someone finds this useful!

Installing TMUX

TMUX is available in most Linux distributions, and can be installed using the package manager for your distribution. Install Here.

Starting TMUX

To start a new TMUX session, simply run tmux in your terminal.
You will now be in a new TMUX session. You can tell that you are in a TMUX session because a status bar will appear at the bottom of the terminal. The status bar typically includes information about the current TMUX session, such as the current window and pane, the hostname, and the time. In a TMUX session, the status bar at the bottom of the terminal will indicate that you are in a TMUX session, but it does not contain a logo.

Common Configuration Changes

Edit ~/.tmux.conf and from below what you want! On TMUX boot, ~/.tmux.conf is executed as a way of saving your configuration. This does mean if this script becomes complex, it will take longer to load tmux so don't go crazy. To load changes: tmux source-file ~/.tmux.conf

  1. Copy Paste!
# Install XClip
sudo apt install xclip
# Confirm
xclip
  1. Status Bar Customization
# Change the color of the status bar
set-option -g status-bg yellow
set-option -g status-fg black
# Change the position of the status bar to the top of the terminal window
set-option -g status-position top
# Display the date and time in the status bar
set-option -g status-right '%F %T'
# Improve term colors
set -g default-terminal 'screen-256color'
  1. Increase history buffer, default is 2000 lines. I'd like to be able to dump many more and be able to copy them afterwards!
# Set scrollback buffer to 10000
set -g history-limit 10000
  1. Change the default 'action' button from Ctrl+b because it sucks.
# Make it space!
unbind C-b
set-option -g prefix C-Space
  1. Move around panes with just arrow keys: T
# Create a keybinding to switch between windows using "Alt + Arrows"
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D

The timeout after the prefix key makes moving around to different panes and re-running a command from history (up arrow + enter) painful. Instead, this avoids pressing the prefix key at all making it much faster. 6. Rebind the unnatural horizontal and vertical split hotkeys to something else.

bind | split-window -h
bind _ split-window -v
unbind '"'
unbind %

Hotkeys

KeybindingAction
Ctrl + Space, ddetach from current session
Ctrl + Space, slist sessions
tmux attach-session -t [session_name/session_id]attach to a specific session
tmux new-session -s [session_name]create a new session
KeybindingAction
Ctrl + Space, _split pane horizontally
Ctrl + Space,
Alt + Left Arrowswitch to the left pane
Alt + Right Arrowswitch to the right pane
Alt + Up Arrowswitch to the upper pane
Alt + Down Arrowswitch to the lower pane
[Hold Ctrl + Space] + Arrow KeysResize currently selected pane within window

End Result

My own terminal involves some hipster shit like zsh and dracula theming, but here it is with some silly random printouts: