From 46c9f672a4a8f5de090d291e8359b3c7d6502370 Mon Sep 17 00:00:00 2001 From: onefang Date: Thu, 23 May 2019 21:49:29 +1000 Subject: Update the tmux config. I do wish they would stop changing config options. --- scripts/install/opensim.tmux.conf | 85 ++++++++++++++++++++++++++++++--------- 1 file changed, 65 insertions(+), 20 deletions(-) diff --git a/scripts/install/opensim.tmux.conf b/scripts/install/opensim.tmux.conf index ea342a2..a5088aa 100644 --- a/scripts/install/opensim.tmux.conf +++ b/scripts/install/opensim.tmux.conf @@ -1,5 +1,6 @@ # 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 @@ -7,46 +8,90 @@ bind-key C-a send-prefix # r reloads the configuration, handy bind r source-file ~/.tmux.conf -unbind % # Remove default binding since we’re replacing them. +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 +# 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 +# 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 -set-option -g mouse-utf8 on +##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 set-remain-on-exit on -#set-option -g set-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' +set-option -g set-titles-string '#W' # Default is "#S:#I:#W - "#T"" -set-option -g status-interval 1 -set-option -g status-justify centre -set-option -g status-utf8 on +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 80 -set-option -g status-left '[#H #S #F]' +#set-option -g status-left '[#H #S #F]' +set-option -g status-left '#H [#S:#I.#P]#F' set-option -g status-right-length 80 set-option -g status-right '%F #(uptime)'<-----># &F is ISO date, uptime starts with the current time, and ends with the load average. B-) -set-option -g visual-activity on -set-option -g visual-content on -set-option -g visual-silence on +# 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 clock-mode-style 24 -# This wont work under Ubuntu 16.04. -set-option -gw mode-mouse on -# Instead do this (also defaults to turning on the above three mouse things) - -#set-option -gw mouse on +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. # 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 +set-option -gw monitor-activity on # Bell on activity. + +# We want 256 colours in our terminal. +set-option -g default-terminal "screen-256color" -- cgit v1.1