summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Beattie <mike@ethernal.org>2019-12-06 11:24:29 +0000
committerMike Beattie <mike@ethernal.org>2019-12-06 11:24:29 +0000
commitdd427a533fbdcd40d3662668b48864bbd403fb10 (patch)
tree9274310f4371189043f6f00444f1aab5f860767e
parent6a3b21a9a12bc559b20969acea28cbb6043d57ae (diff)
TMUX: Add comments, re-order slightly
Signed-off-by: Mike Beattie <mike@ethernal.org>
-rw-r--r--.tmux.conf28
1 files changed, 23 insertions, 5 deletions
diff --git a/.tmux.conf b/.tmux.conf
index 71a1e0b..85357ab 100644
--- a/.tmux.conf
+++ b/.tmux.conf
@@ -1,13 +1,19 @@
-set -g default-terminal "tmux-256color"
+##################################################################################
+#
+# Settings
+#
-set -g prefix2 C-x
-bind-key -T prefix C-x send-prefix -2
+# Change the terminal type to add more colour
+set -g default-terminal "tmux-256color"
+# Enable mouse support
set -g mouse on
+# Window titles.
set -g set-titles on
set -g set-titles-string "[ #H.#S.#I ] [ #W ] [ #T ] #{session_alerts}"
+# Status bar
set -g status on
set -g status-interval 1
set -g status-justify centre
@@ -20,24 +26,36 @@ set -g status-left-length 30
set -g status-right "#[fg=green]][ #[fg=cyan]%Y-%m-%d #[fg=white]%I:%M #[fg=green]]"
set -g status-right-length 40
-
+# Pane border and status
setw -g pane-border-format " #P: #T "
setw -g pane-border-status bottom
+# Active window style
setw -g window-status-current-format "#[fg=red](#[fg=white]#I.#P#F$ #W#[fg=red])"
setw -g window-status-current-style fg=white,bright
+# In-active window style
setw -g window-status-format " #I.#P#F$ #W "
setw -g window-status-style fg=white,dim
+##################################################################################
+#
+# Key Bindings
+#
+
+# Add a second prefix, and a binding to send the prefix
+set -g prefix2 C-x
+bind-key -T prefix C-x send-prefix -2
+
+# Remove the Ctrl-<direction> bindings
unbind-key -T prefix C-Up
unbind-key -T prefix C-Down
unbind-key -T prefix C-Left
unbind-key -T prefix C-Right
+# Add Shift-<direction> bindings to change pane sizes
bind-key -r -T prefix S-Up resize-pane -U
bind-key -r -T prefix S-Down resize-pane -D
bind-key -r -T prefix S-Left resize-pane -L
bind-key -r -T prefix S-Right resize-pane -R
-