Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set -g prefix F12
- unbind-key -n C-a
- # i3 like
- setw -g aggressive-resize on
- # i3-like focus
- bind-key -T root M-h display-panes \; select-pane -R
- bind-key -T root M-j display-panes \; select-pane -D
- bind-key -T root M-k display-panes \; select-pane -U
- bind-key -T root M-l display-panes \; select-pane -L
- # i3-like panes movement
- bind-key -T root M-H display-panes \; swap-pane -d -s :. -t ":.{left-of}"
- bind-key -T root M-J display-panes \; swap-pane -d -s :. -t ":.{down-of}"
- bind-key -T root M-K display-panes \; swap-pane -d -s :. -t ":.{up-of}"
- bind-key -T root M-L display-panes \; swap-pane -d -s :. -t ":.{right-of}"
- # i3-like pan creation
- bind-key -T root M-t new-window -c "#{pane_current_path}" \; rename-window -
- bind-key -T root M-i display-panes \; split-window -h -c "#{pane_current_path}"
- bind-key -T root M-u display-panes \; split-window -v -c "#{pane_current_path}"
- # i3-like zoom (in and out)
- bind-key -T root M-f resize-pane -Z
- bind-key -T root M-x kill-pane
- bind-key -T root M-X kill-window
- # i3-like switch
- set -g base-index 1
- setw -g pane-base-index 1
- bind-key -T root M-0 select-window -t :=0
- bind-key -T root M-1 select-window -t :=1
- bind-key -T root M-2 select-window -t :=2
- bind-key -T root M-3 select-window -t :=3
- bind-key -T root M-4 select-window -t :=4
- bind-key -T root M-5 select-window -t :=5
- bind-key -T root M-5 select-window -t :=6
- bind-key -T root M-7 select-window -t :=7
- bind-key -T root M-8 select-window -t :=8
- bind-key -T root M-9 select-window -t :=9
- # i3-like move
- bind-key -T root M-! join-pane -t :=1
- bind-key -T root M-@ join-pane -t :=2
- bind-key -T root M-# join-pane -t :=3
- bind-key -T root M-$ join-pane -t :=4
- bind-key -T root M-% join-pane -t :=5
- bind-key -T root M-^ join-pane -t :=6
- bind-key -T root M-& join-pane -t :=7
- bind-key -T root M-* join-pane -t :=8
- bind-key -T root M-( join-pane -t :=9
- bind-key -T root M-) join-pane -t :=0
- bind-key -T root M-U previous-window
- bind-key -T root M-I next-window
- # enable mouse
- set -g mouse on
- # standard begin-selection
- bind-key -T copy-mode MouseDrag1Pane select-pane \; send-keys -X begin-selection
- bind-key -T copy-mode-vi MouseDrag1Pane select-pane \; send-keys -X begin-selection
- # do nothing on release
- bind-key -T copy-mode MouseDragEnd1Pane run-shell "true"
- bind-key -T copy-mode-vi MouseDragEnd1Pane run-shell "true"
- # on click cancel selection
- bind-key -T copy-mode MouseDown1Pane select-pane \; send-keys -X cancel
- bind-key -T copy-mode-vi MouseDown1Pane select-pane \; send-keys -X cancel
- # on alt+c copy
- bind-key -T copy-mode-vi M-c send-keys -X copy-selection-and-cancel \; run-shell "tmux show-buffer | xclip -i -selection clipboard 2>/dev/null 1>/dev/null"
- bind-key -T copy-mode M-c send-keys -X copy-selection-and-cancel \; run-shell "tmux show-buffer | xclip -i -selection clipboard 2>/dev/null 1>/dev/null"
- bind-key -T copy-mode-vi Enter send-keys -X copy-selection-and-cancel \; run-shell "tmux show-buffer | xclip -i -selection clipboard 2>/dev/null 1>/dev/null"
- bind-key -T copy-mode Enter send-keys -X copy-selection-and-cancel \; run-shell "tmux show-buffer | xclip -i -selection clipboard 2>/dev/null 1>/dev/null"
- bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel \; run-shell "tmux show-buffer | xclip -i -selection clipboard 2>/dev/null 1>/dev/null"
- bind-key -T copy-mode y send-keys -X copy-selection-and-cancel \; run-shell "tmux show-buffer | xclip -i -selection clipboard 2>/dev/null 1>/dev/null"
- # on alt+c enter copy
- bind-key -T root M-c copy-mode
- # on alt+v paste
- bind-key -T root M-v run-shell "xclip -o -selection clipboard | tmux load-buffer /dev/stdin" \; paste-buffer
- # vi-like copy
- bind-key -T root M-p run-shell "xclip -o -selection clipboard | tmux load-buffer /dev/stdin" \; paste-buffer
- bind-key -T copy-mode v send-keys -X begin-selection
- bind-key -T copy-mode-vi v send-keys -X begin-selection
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement