From e42030bc3449ea966e114626cd22009df4abdba8 Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Tue, 13 Aug 2019 15:11:48 -0400 Subject: tmux: adopt --- templates/.tmux.conf | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 templates/.tmux.conf diff --git a/templates/.tmux.conf b/templates/.tmux.conf new file mode 100644 index 0000000..09243b0 --- /dev/null +++ b/templates/.tmux.conf @@ -0,0 +1,50 @@ +# vim: ft=tmux +# enable mouse +set -g mouse on + +# don't delay escape key +set -sg escape-time 0 + +set-option -g mode-keys vi +# :#{pane_current_command}:#(pwd="#{pane_current_path}"; echo ${pwd####*/})#F' +#set-option -g window-status-format '#I:#{?window_name,#{window_name},#{pane_current_command}#(pwd="#{pane_current_path}"; echo ${pwd####*/})}#F' +#set-option -g window-status-current-format '#I:#{?window_name,#{window_name},#{pane_current_command}#(pwd="#{pane_current_path}"; echo ${pwd####*/})}#F' +#set-option -g window-status-current-format '#I:#{?window_name,#{window_name},#{pane_current_command}}#F' + +#set-option -g status-right '%d%H%M%Z #(date -u +"%%d%%H%%M%%Z") #(cat $HOME/.cache/metar)' +#set-option -g status-right-length 100 + +set-option -g status-bg default +set-option -g status-fg green + + +# make | and - split windows +bind-key | split-window -h +bind-key - split-window -v +unbind-key '"' +unbind-key % + +# easily reload tmux config +bind-key r source-file ~/.tmux.conf + +# use vim-like keys for pane navigation +bind-key C-h select-pane -L +bind-key C-l select-pane -R +bind-key C-j select-pane -D +bind-key C-k select-pane -U + +# use vim-like keys for pane resizing +bind-key h resize-pane -L 5 +bind-key j resize-pane -D 5 +bind-key k resize-pane -U 5 +bind-key l resize-pane -R 5 +bind-key H resize-pane -L 15 +bind-key J resize-pane -D 15 +bind-key K resize-pane -U 15 +bind-key L resize-pane -R 15 + +{{ if eq .OS "darwin" }} +# copy/paste with pbcopy +bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy" +bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy" +{{ end }} -- cgit v1.2.3