aboutsummaryrefslogtreecommitdiff
path: root/tmux
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2012-06-05 23:04:55 +1200
committerTom Ryder <tom@sanctum.geek.nz>2012-06-05 23:04:55 +1200
commit47a5debc449f4f1d62d56107a44c66ddf83997c8 (patch)
tree79d149a398b7c6c8523bc3d2db3f4f44518917fb /tmux
parentCompletely redo bash startup files (diff)
downloaddotfiles-47a5debc449f4f1d62d56107a44c66ddf83997c8.tar.gz
dotfiles-47a5debc449f4f1d62d56107a44c66ddf83997c8.zip
Add colour conditionals to tmux conf
This way it makes sense when used in a Linux console or anything else not smart enough to have 256 colours
Diffstat (limited to 'tmux')
-rw-r--r--tmux/tmux.conf30
1 files changed, 15 insertions, 15 deletions
diff --git a/tmux/tmux.conf b/tmux/tmux.conf
index bd221906..673ca076 100644
--- a/tmux/tmux.conf
+++ b/tmux/tmux.conf
@@ -34,39 +34,39 @@ bind-key K swap-pane -U
# Activity
set-window-option -g monitor-activity on
set-window-option -g window-status-activity-attr none
-set-window-option -g window-status-activity-bg colour237
-set-window-option -g window-status-activity-fg colour248
+if-shell 'test `tput colors` -eq 256' 'set-window-option -g window-status-activity-bg colour237'
+if-shell 'test `tput colors` -eq 256' 'set-window-option -g window-status-activity-fg colour248'
# Indices
set-option -g base-index 1
# Messages
-set-option -g message-bg colour18
-set-option -g message-fg colour231
+if-shell 'test `tput colors` -eq 256' 'set-option -g message-bg colour18'
+if-shell 'test `tput colors` -eq 256' 'set-option -g message-fg colour231'
# Modes
set-window-option -g mode-keys vi
-set-window-option -g mode-bg colour18
-set-window-option -g mode-fg colour231
+if-shell 'test `tput colors` -eq 256' 'set-window-option -g mode-bg colour18'
+if-shell 'test `tput colors` -eq 256' 'set-window-option -g mode-fg colour231'
# Pane borders
-set-option -g pane-active-border-bg colour237
-set-option -g pane-active-border-fg colour237
-set-option -g pane-border-bg colour237
-set-option -g pane-border-fg colour237
+if-shell 'test `tput colors` -eq 256' 'set-option -g pane-active-border-bg colour237'
+if-shell 'test `tput colors` -eq 256' 'set-option -g pane-active-border-fg colour237'
+if-shell 'test `tput colors` -eq 256' 'set-option -g pane-border-bg colour237'
+if-shell 'test `tput colors` -eq 256' 'set-option -g pane-border-fg colour237'
# Status bar
-set-option -g status-bg colour237
-set-option -g status-fg colour248
set-option -g status-left '[#S]'
set-option -g status-right '[#H] #(date +"%F %T")'
-set-window-option -g window-status-current-format "#[fg=colour231]#I:#W#F"
-set-window-option -g window-status-format "#[fg=colour16]#I:#W#F"
+if-shell 'test `tput colors` -eq 256' 'set-option -g status-bg colour237'
+if-shell 'test `tput colors` -eq 256' 'set-option -g status-fg colour248'
+if-shell 'test `tput colors` -eq 256' 'set-window-option -g window-status-current-format "#[fg=colour231]#I:#W#F"'
+if-shell 'test `tput colors` -eq 256' 'set-window-option -g window-status-format "#[fg=colour16]#I:#W#F"'
# Terminal
-set-option -g default-terminal "screen-256color"
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'
set-option -s escape-time 0
+if-shell 'test `tput colors` -eq 256' 'set-option -g default-terminal "screen-256color"'
# Titles
set-window-option -g automatic-rename off