From: Darshaka Pathirana Date: Fri, 4 Mar 2022 21:15:54 +0000 (+0100) Subject: tmux.conf: source user-specific local conf file ~/.tmux.conf.local X-Git-Tag: v0.19.3~2^2 X-Git-Url: http://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=2060f8d0ec99870896b214215f871d2b86aede2b tmux.conf: source user-specific local conf file ~/.tmux.conf.local To manage a user-specific local configuration file (like in Grml's '.vimrc.conf' + '.zshrc.conf') we need to source '~/.tmux.conf.local'. "bind-key R" (Reload Config) does now reload the 'main" config file '~/.tmux.conf' and the user-specific local configuration file '~/.tmux.conf.local'. With 'source-file -q', no error will be returned if the file does not exist. --- diff --git a/etc/tmux.conf b/etc/tmux.conf index 0c55b57..57e866c 100644 --- a/etc/tmux.conf +++ b/etc/tmux.conf @@ -26,7 +26,7 @@ bind-key j join-pane -s ! bind-key B if-shell "! tmux has-session -t bg" "new-session -d -s bg" \; move-window -t bg ### Reload Config -bind-key R source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded" +bind-key R source-file ~/.tmux.conf \; source-file -q ~/.tmux.conf.local \; display-message "~/.tmux.conf[.local] reloaded" ###rebind keys bind-key h next-layout @@ -62,3 +62,6 @@ set -g status-right '#[fg=yellow]%Y-%m-%d %H:%M' set-window-option -g window-status-style fg=blue,bg=black set-window-option -g window-status-current-style bold + +### source user-specific local configuration file +source-file -q ~/.tmux.conf.local