feat(tmux): tmux as main session in all new terminals
This commit is contained in:
parent
22379f8a23
commit
150d7b0ce8
@ -3,17 +3,23 @@ bind -r h select-pane -L # move left
|
|||||||
bind -r j select-pane -D # move down
|
bind -r j select-pane -D # move down
|
||||||
bind -r k select-pane -U # move up
|
bind -r k select-pane -U # move up
|
||||||
bind -r l select-pane -R # move right
|
bind -r l select-pane -R # move right
|
||||||
|
bind | split-window -h -c "#{pane_current_path}"
|
||||||
|
bind _ split-window -v -c "#{pane_current_path}"
|
||||||
|
|
||||||
set -g prefix C-a
|
set -g prefix C-b
|
||||||
|
|
||||||
set -g status-bg black
|
set -g status-bg black
|
||||||
set -g status-fg white
|
set -g status-fg white
|
||||||
|
|
||||||
|
set-option -g status off
|
||||||
set -g mouse on
|
set -g mouse on
|
||||||
|
|
||||||
set-option -g repeat-time 0
|
set-option -g repeat-time 0
|
||||||
|
|
||||||
# -- copy mode -----------------------------------------------------------------
|
|
||||||
|
|
||||||
# prefix + [ -> [hlkj] -> Space(to select) -> y(to copy)
|
bind-key v copy-mod
|
||||||
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
|
setw -g mode-keys vi
|
||||||
|
bind P paste-buffer
|
||||||
|
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||||
|
bind-key -T copy-mode-vi c send-keys -X clear-selection
|
||||||
|
bind-key -T copy-mode-vi y send-keys -X copy-selection
|
||||||
|
bind-key -T copy-mode-vi V send-keys -X rectangle-toggle
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
|
|
||||||
# .zshrc by TheK4n
|
# .zshrc by TheK4n
|
||||||
# https://github.com/TheK4n/dotfiles
|
# https://github.com/TheK4n/dotfiles
|
||||||
|
|
||||||
|
if command -v tmux &>/dev/null && [ -z "$TMUX" ] && [[ ! "$TERM" =~ tmux ]]; then
|
||||||
|
exec tmux new
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f $HOME/.config/zsh/sourcer ]; then
|
if [ -f $HOME/.config/zsh/sourcer ]; then
|
||||||
source $HOME/.config/zsh/sourcer
|
source $HOME/.config/zsh/sourcer
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user