aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-06-15 14:56:14 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-06-15 14:56:14 +1200
commit73da0681ef299948f77c3e1c3452145012f31a3e (patch)
tree43ecb7d3f0cbcc2e490d235c2731b22536aac826
parentbdb24d2c0d2cd697a81ee244ae3b6be7d148555e (diff)
downloaddotfiles-73da0681ef299948f77c3e1c3452145012f31a3e.tar.gz
dotfiles-73da0681ef299948f77c3e1c3452145012f31a3e.zip
Remove color/colour templating from tmux.conf
tmux 2.4 added support for globs, which makes all of this templating nastiness go away: <https://github.com/tmux/tmux/blob/master/CHANGES#L192> A user who wants custom settings (such as me on my work system) can just drop overrides into ~/.tmux.conf.d/something.conf and go home.
-rw-r--r--.gitignore2
-rw-r--r--Makefile8
-rw-r--r--README.markdown4
-rw-r--r--tmux/tmux.conf (renamed from tmux/tmux.conf.mi5)10
4 files changed, 7 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore
index 36c16182..c4a552f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -160,6 +160,4 @@ gnupg/gpg.conf
gnupg/gpg.conf.m4
include/mktd.m4
man/man7/dotfiles.7df
-tmux/tmux.conf
-tmux/tmux.conf.m4
urxvt/ext/select
diff --git a/Makefile b/Makefile
index 50c1b939..20d14b28 100644
--- a/Makefile
+++ b/Makefile
@@ -245,8 +245,6 @@ clean distclean:
gnupg/gpg.conf.m4 \
include/mktd.m4 \
man/man8/dotfiles.7df \
- tmux/tmux.conf \
- tmux/tmux.conf.m4 \
urxvt/ext/select
.awk:
@@ -309,12 +307,6 @@ MAILDIR = $(HOME)/Mail
TMUX_BG = colour237
TMUX_FG = colour248
-tmux/tmux.conf: tmux/tmux.conf.m4
- m4 \
- -D TMUX_BG=$(TMUX_BG) \
- -D TMUX_FG=$(TMUX_FG) \
- tmux/tmux.conf.m4 > $@
-
install: install-bin \
install-curl \
install-ex \
diff --git a/README.markdown b/README.markdown
index 574d3ec3..36add541 100644
--- a/README.markdown
+++ b/README.markdown
@@ -327,10 +327,6 @@ Note that the configuration presently uses a hard-coded 256-color colorscheme,
and uses non-login shells, with an attempt to control the environment to stop
shells thinking they have access to an X display.
-The configuration file is created with `mi5(1df)` to allow specifying a color
-theme. This is just because I use a different color for my work session. The
-default is a dark grey.
-
The shell scripts in `bin` include `tm(1df)`, a shortcut to make `attach` into
the default command if no arguments are given and sessions do already exist. My
`~/.inputrc` file binds Alt+M to run that, and Tmux in turn binds the same key
diff --git a/tmux/tmux.conf.mi5 b/tmux/tmux.conf
index 27ae1417..4acf6a3d 100644
--- a/tmux/tmux.conf.mi5
+++ b/tmux/tmux.conf
@@ -110,15 +110,15 @@ set-option -g message-style "bg=colour18,fg=colour231"
set-window-option -g mode-style "bg=colour18,fg=colour231"
# Pane borders are always in the background color
-set-option -g pane-border-style "fg=<% TMUX_BG %>"
-set-option -g pane-active-border-style "fg=<% TMUX_BG %>"
+set-option -g pane-border-style "fg=colour237"
+set-option -g pane-active-border-style "fg=colour237"
# Inactive windows have slightly washed-out system colours
set-option -g window-style "bg=colour232,fg=colour248"
set-option -g window-active-style "bg=colour0,fg=colour15"
# The status bar has the defined background and foreground colours
-set-option -g status-style "bg=<% TMUX_BG %>,fg=<% TMUX_FG %>"
+set-option -g status-style "bg=colour237,fg=colour248"
# Titles of windows default to black text with no embellishment
set-window-option -g window-status-style "fg=colour16"
@@ -128,3 +128,7 @@ set-window-option -g window-status-current-style "fg=colour231"
# A window with a bell has a title with a red background until cleared
set-window-option -g window-status-bell-style "bg=colour9"
+
+# Source any configuration in the subdir if there is any
+if-shell 'set -- "$HOME"/.tmux.conf.d/*;test -e "$1"' \
+ 'source-file ~/.tmux.conf.d/*.conf'