Created
November 24, 2023 04:33
-
-
Save X3eRo0/890bdec532426cbcd21616aeffff13e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unbind r | |
bind-key : command-prompt | |
bind-key r refresh-client | |
# set -g prefix C-s | |
set -sg escape-time 0 | |
set-option -g focus-events on | |
set -g default-terminal "screen-256color" | |
set-option -sa terminal-features ',XXX:RGB' | |
set -g mouse on | |
set-option -g default-shell /bin/bash | |
set-option -g set-clipboard on | |
bind Tab next-window | |
bind BTab previous-window | |
# set scroll buffer to 5000 lines | |
set -g history-limit 5000 | |
# act like vim | |
bind _ split-window -h -c "#{pane_current_path}" | |
bind - split-window -v -c "#{pane_current_path}" | |
bind c new-window -c "#{b:pane_current_path}" | |
setw -g mode-keys vi | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'christoomey/vim-tmux-navigator' | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
set -g @dracula-show-powerline false | |
set -g @dracula-fixed-location "Tempe" | |
set -g @dracula-plugins "weather" | |
set -g @dracula-show-flags true | |
set -g @dracula-show-left-icon session | |
set -g status-position bottom | |
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'" | |
bind -n WheelDownPane select-pane -t= \; send-keys -M | |
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M | |
bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up | |
bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down | |
bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up | |
bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down | |
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -i -sel clipboard" | |
# To copy, left click and drag to highlight text in yellow, | |
# once you release left click yellow text will disappear and will automatically be available in clibboard | |
# # Use vim keybindings in copy mode | |
setw -g mode-keys vi | |
# Update default binding of `Enter` to also use copy-pipe | |
bind -T copy-mode-vi v send -X begin-selection | |
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy" | |
bind P paste-buffer | |
run '~/.tmux/plugins/tpm/tpm' | |
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "send-keys C-l" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment