diff --git a/.dfminstall b/.dfminstall index ffe2ffd..75c42f6 100644 --- a/.dfminstall +++ b/.dfminstall @@ -2,6 +2,7 @@ bin recurse .config recurse bin/dfm chmod 0755 +.tmux/newpanes 0755 .tmux/zoom 0755 README.md skip diff --git a/.tmux.conf b/.tmux.conf index 5f85793..2a09f64 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -102,9 +102,9 @@ unbind -t vi-copy Enter bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" -# split panes using | and - -bind | split-window -h -bind - split-window -v +# split panes using | and -, open new pane in current directory +bind | send-keys " ~/.tmux/newpanes -h" C-m +bind - send-keys " ~/.tmux/newpanes -v" C-m unbind '"' unbind % @@ -115,8 +115,13 @@ setw -g pane-base-index 1 # reload config file (change file location to your the tmux.conf you want to use) -bind r source-file ~/.tmux.conf +bind r source-file ~/.tmux.conf \; display "tmux config reloaded..." # Setup 'x' zoom into a panes (maximize) an save/restore other panes in the current window bind x run ". ~/.tmux/zoom" + + +# set terminal title +set -g set-titles on +set -g set-titles-string '#(whoami)@#h | #(curl ipecho.net/plain;echo)' \ No newline at end of file diff --git a/.tmux/newpanes b/.tmux/newpanes new file mode 100755 index 0000000..2fdd091 --- /dev/null +++ b/.tmux/newpanes @@ -0,0 +1,5 @@ +#!/bin/sh + +TMUX_CURRENT_DIR=`pwd` +tmux split-window $1 +tmux send-keys "cd $TMUX_CURRENT_DIR;clear" C-m \ No newline at end of file