From c72c859deb70d077239dcdfc3215f5b5fa92bbca Mon Sep 17 00:00:00 2001 From: James Dixon Date: Mon, 21 Nov 2022 12:51:56 -0500 Subject: [PATCH] source local tmux config files --- config/tmux/.tmux.conf | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/config/tmux/.tmux.conf b/config/tmux/.tmux.conf index 14b8749..c240837 100644 --- a/config/tmux/.tmux.conf +++ b/config/tmux/.tmux.conf @@ -54,5 +54,14 @@ bind-key '"' split-window -v -c '#{pane_current_path}' bind-key % split-window -h -c '#{pane_current_path}' bind c new-window -c '#{pane_current_path}' -# Source conf +# re-source this conf bind-key r source-file ~/.tmux.conf \; display-message "Sourced ~/.tmux.conf!" + +# source local confs if they exist +if-shell -b '[ -f "$HOME/.config/tmux.conf" ]' "source-file ~/.config/tmux.conf" +if-shell -b '[ -f "$HOME/.local/tmux.conf" ]' "source-file ~/.local/tmux.conf" + +# I really like tmux, but the way the handle backwards-compat in their config SUCKS!! +# https://stackoverflow.com/questions/35016458/how-to-write-if-statement-in-tmux-conf-to-set-different-options-for-different-t +# https://github.com/tmux/tmux/issues/1732 +