From cb3d2ac9f343100eb3100d571df9c916d32ca3bf Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Mon, 2 Nov 2015 11:04:46 +0100 Subject: [PATCH] reduce the number of times loading the configuration shells out --- .tmux.conf | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index fbfa0dd..d65e572 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -102,8 +102,8 @@ bind F run "cut -c3- ~/.tmux.conf | sh -s fpp #{pane_id}" bind -t vi-choice h tree-collapse bind -t vi-choice l tree-expand -run 'tmux bind -t vi-choice K start-of-list 2> /dev/null' -run 'tmux bind -t vi-choice J end-of-list 2> /dev/null' +run -b 'tmux bind -t vi-choice K start-of-list 2> /dev/null' +run -b 'tmux bind -t vi-choice J end-of-list 2> /dev/null' bind -t vi-choice H tree-collapse-all bind -t vi-choice L tree-expand-all bind -t vi-choice Escape cancel @@ -136,7 +136,7 @@ bind -t vi-copy H start-of-line bind -t vi-copy L end-of-line # copy to Mac OSX pasteboard -if 'which -s reattach-to-user-namespace' 'bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"' +if -b 'which -s reattach-to-user-namespace' 'bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"' # -- user defined -------------------------------------------------------------- @@ -146,9 +146,7 @@ if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local' # -- 8< ------------------------------------------------------------------------ -run 'cut -c3- ~/.tmux.conf | sh -s apply_theme' -run 'cut -c3- ~/.tmux.conf | sh -s apply_configurable_bindings' -run 'for name in $(printenv | grep -Eo ^tmux_conf_[^=]+); do tmux setenv -gu $name; done;' +run 'cut -c3- ~/.tmux.conf | sh -s apply_configuration' # ►_◄ @@ -497,6 +495,12 @@ run 'for name in $(printenv | grep -Eo ^tmux_conf_[^=]+); do tmux setenv -gu $na # fi # } # +# apply_configuration() { +# apply_theme +# apply_configurable_bindings +# for name in $(printenv | grep -Eo ^tmux_conf_[^=]+); do tmux setenv -gu $name; done; +# } +# # urlview() { # tmux capture-pane -J -S - -E - -b urlview-$1 -t $1 # tmux split-window "(tmux show-buffer -b urlview-$1 | urlview || true); tmux delete-buffer -b urlview-$1" @@ -506,4 +510,5 @@ run 'for name in $(printenv | grep -Eo ^tmux_conf_[^=]+); do tmux setenv -gu $na # tmux capture-pane -J -S - -E - -b fpp-$1 -t $1 # tmux split-window "(tmux show-buffer -b fpp-$1 | fpp || true); tmux delete-buffer -b fpp-$1" # } +# # $@