diff --git a/bash/.bashrc b/bash/.bashrc index f237bd0..8adaac1 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -1,3 +1,5 @@ +[ -z "$TMUX" ] && tmux a + [ -f /etc/bashrc ] && . /etc/bashrc . /usr/local/etc/profile.d/z.sh [ -f /etc/bash_completion ] && . /etc/bash_completion diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index a09af19..8cb4bd7 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -1,11 +1,6 @@ # NOTE: First of all install TPM # git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm -# unbind-key C-b -# set -g prefix C-a - -set-clipboard on - set-option -g default-command "reattach-to-user-namespace -l bash" # Set the base index for windows to 1 instead of 0. @@ -66,8 +61,8 @@ unbind-key -T copy-mode-vi v bind-key -T copy-mode-vi 'v' send -X begin-selection # Begin selection in copy mode. bind-key -T copy-mode-vi 'C-v' send -X rectangle-toggle # Begin selection in copy mode. bind-key -T copy-mode-vi 'y' send -X copy-selection # Yank selection in copy mode. -bind-key -t copy-mode-vi 'K' halfpage-up -bind-key -t copy-mode-vi 'J' halfpage-down +bind-key -T copy-mode-vi 'K' send -X halfpage-up +bind-key -T copy-mode-vi 'J' send -X halfpage-down # => Plugins set -g @plugin 'tmux-plugins/tpm' @@ -83,7 +78,7 @@ set -g @plugin 'tmux-plugins/tmux-open' set -g @plugin 'tmux-plugins/tmux-pain-control' # If run as "tmux attach", create a session if one does not already exist -new-session -A -s main +new-session -A -s default # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run '~/.tmux/plugins/tpm/tpm'