Last active
June 6, 2024 03:39
-
-
Save rnyrnyrny/c74d45063e9270489961328e075aab57 to your computer and use it in GitHub Desktop.
my tmux conf
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
set-option -g default-shell /bin/bash #up to you | |
unbind ^b | |
set -g prefix M-q | |
#set -g utf8 on | |
#set -g status-utf8 on | |
set-option -g focus-events on | |
set-option -sa terminal-overrides ',XXX:RGB' | |
bind R source-file ~/.tmux.conf \; display-message "Config reloaded..." | |
# Ctrl-Left/Right cycles thru windows (no prefix) | |
bind-key -n "M-Left" select-window -t :- | |
bind-key -n "M-p" select-window -t :- | |
bind-key -n "M-Right" select-window -t :+ | |
bind-key -n "M-n" select-window -t :+ | |
bind-key -n "M-0" select-window -t :0 | |
bind-key -n "M-1" select-window -t :1 | |
bind-key -n "M-2" select-window -t :2 | |
bind-key -n "M-3" select-window -t :3 | |
bind-key -n "M-4" select-window -t :4 | |
bind-key -n "M-5" select-window -t :5 | |
bind-key -n "M-6" select-window -t :6 | |
bind-key -n "M-7" select-window -t :7 | |
bind-key -n "M-8" select-window -t :8 | |
bind-key -n "M-9" select-window -t :9 | |
bind-key * list-clients | |
unbind [ | |
bind a copy-mode | |
bind-key -n "F10" copy-mode | |
bind v paste-buffer | |
bind -T copy-mode-vi 'v' send -X begin-selection | |
bind -T copy-mode-vi 'y' send -X copy-selection | |
# for tmux under 2.3 | |
# bind-key -t vi-copy 'v' begin-selection | |
# bind-key -t vi-copy 'y' copy-selection | |
set -g default-terminal "screen-256color" # use 256 colors | |
# set -g default-terminal "xterm-256color" # use 256 colors | |
set -g escape-time 10 # set a low value so that Esc is not delayed in vim/neovim | |
set -g status-justify centre | |
set -g status-left "#[fg=default]s#S:w#I.p#P#[default]" | |
#set -g status-left-attr bright | |
set -g status-left-length 20 | |
set -g visual-activity on | |
setw -g monitor-activity off | |
setw -g automatic-rename off | |
set-option -g allow-rename off | |
set -g display-time 5000 # status line messages display | |
set -g history-limit 50000 # scrollback buffer n lines | |
set -g status-keys vi | |
setw -g mode-keys vi | |
set -g terminal-overrides 'xterm*:smcup@:rmcup@' # allow scrolling | |
# default statusbar colors | |
set -g status-bg colour0 #base02 | |
set -g status-fg colour136 #yellow | |
#set -g status-attr default | |
bind -r k select-pane -U | |
bind -r j select-pane -D | |
bind -r h select-pane -L | |
bind -r l select-pane -R | |
bind-key -n "M-k" select-pane -U | |
bind-key -n "M-j" select-pane -D | |
bind-key -n "M-h" select-pane -L | |
bind-key -n "M-l" select-pane -R | |
bind -n M-m clear-history | |
# for nested-tmux, press alt-o to disable local tmux's key bindings | |
bind -T root -n "M-o" \ | |
set prefix None \;\ | |
set key-table off \;\ | |
set status-style "fg=colour245,bg=colour238" \;\ | |
set window-status-current-style "fg=colour232,bold,bg=colour254" \;\ | |
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\ | |
refresh-client -S | |
bind -T off -n "M-o" \ | |
set -u prefix \;\ | |
set -u key-table \;\ | |
set -u status-style \;\ | |
set -u window-status-current-style \;\ | |
refresh-client -S | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
run '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment