# Tmux has a habit of changing what these options are for each version, so this is a bit of a mess. # Screen compatibility, change the command key. And rebind the prefix sending command. set-option -g prefix C-a unbind-key C-b bind-key C-a send-prefix # r reloads the configuration, handy bind r source-file ~/.tmux.conf bind R clear-history # More sane pane gain. B-) unbind % # Remove default binding since we’re replacing them. unbind '"' bind | split-window -h bind - split-window -v # pane border set -g pane-border-status top #colors for pane borders set-window-option -g pane-border-style fg=black,bg=green set-window-option -g pane-active-border-style fg=black,bg=red set-window-option -g automatic-rename off set-window-option -g pane-border-format '[#{pane_index}:#{pane_title}]' # select-pane -t 1 -T "fancy pane title" # Note that running a program in that tab might override it - 1 mc [dvs1@Superbitch]:/media/DATA/home/dvs1 # set-options -g global, -s server, -w window, otherwise a session option. # -a appends a string to the existing option. # -u unsets an option. # -o prevents setting an aption if it is already set. # -q shut up info messages. # SESSION OPTIONS set-option -g bell-action any ##set-option -g bell-on-alert on set-option -g visual-activity both set-option -g visual-bell both # Not actually documented what the limit is, but there is one. set-option -g history-limit 100000 # All this mouse stuff is unreliable in UTF8 mode. At least on roxterm. # Also keep in mind the terminal specs mouse report limit of 256 characters, being less than my typical terminal width. # Hmm, still wont pass mouse through like the docs say they will. # Ah, mc needs "mc -x". Though once again, watch that right edge on huge terminals. # These three wont work under Ubuntu 16.04. ##set-option -g mouse-resize-pane on ##set-option -g mouse-select-pane on ##set-option -g mouse-select-window on # This wont work under Ubuntu 16.04. ##set-option -g mode-mouse on # on - mouse does copy mode stuff; copy-mode - mouse can't go into copy mode, but does stuff once in there; off - mouse is unmolested. # Instead do this (also defaults to turning on the above three mouse things) - set-option -g mouse on # Or this. sigh #set-option -g mouse ##set-option -g mouse-utf8 off # Defaults to on. #set-option -g remain-on-exit on # How to set the title of the terminal window. set-option -g set-titles on set-option -g set-titles-string '#W' # Default is "#S:#I:#W - "#T"" set-option -g status-interval 1 # Redraw status line every second, for the clock. set-option -g status-justify centre # Window list in the middle. ##set-option -g status-utf8 on # Character pair Replaced with #(shell-command) First line of the command's output #[attributes] Colour or attribute change #H Hostname of local host (not FDQN) #h Hostname of local host without the domain name #F Current window flag #I Current window index #D Current pane unique identifier #P Current pane index #S Session name #T Current pane title #W Current window name ## A literal ‘#’ # Yes, my terminal really is bigger than 160 characters. set-option -g status-left-length 42 #set-option -g status-left '[#H #S #F]' set-option -g status-left '#H [#S:#I.#P]#F' set-option -g status-right-length 64 set-option -g status-right "%F #(uptime | cut -d ' ' -f 2-2,10-)" # %F is ISO date, uptime starts with the current time, and ends with the load average. B-) # Set window notifications set-option -g visual-activity on # Show status message for activity in monitor-activity windows. #set-option -g visual-content on # Show status message for content in monitor-content windows. Based on a fnmatch(3) string. set-option -g visual-silence on # Show status message for silence in monitor-silence windows. Based on a set interval. set-option -gw alternate-screen off # Don't save the original screen before starting tmux, may also allow use of the terminals original scrollback buffer. set-option -gw clock-mode-style 24 # We are using the uptime clock anyway, so this is pointless. set-option -gw monitor-activity on # Bell on activity. # Highlight active window set-option -gw window-status-current-bg red set-option -gw window-status-current-format '[#I:#W]' set-option -gw window-status-format '[#I:#W]#F' # Set window notifications set-option -gw monitor-activity on # Bell on activity. # We want 256 colours in our terminal. set-option -g default-terminal "screen-256color"