Last active
January 18, 2025 16:16
-
-
Save abrasumente233/14c7fdc98c65a86c124e7be9743a7f3c to your computer and use it in GitHub Desktop.
.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
# plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-cpu' | |
# remap prefix from 'C-b' to 'M-a' | |
unbind C-b | |
set-option -g prefix M-a | |
bind-key M-a send-prefix | |
# renumber windows | |
unbind n | |
bind n \ | |
set -g renumber-windows on\; \ | |
new-window\; kill-window\; \ | |
set -g renumber-windows off | |
# split panes using v and h | |
bind -n M-d split-window -h | |
bind v split-window -h | |
bind h split-window -v | |
unbind '"' | |
unbind % | |
# reload config file | |
bind r source-file ~/.tmux.conf | |
# switch panes using Alt-arrow or Alt-hjkl without prefix | |
bind -n M-Left select-pane -L | |
bind -n M-Right select-pane -R | |
bind -n M-Up select-pane -U | |
bind -n M-Down select-pane -D | |
# bind -n M-h select-pane -L | |
# bind -n M-l select-pane -R | |
# bind -n M-k select-pane -U | |
# bind -n M-j select-pane -D | |
# cycle through panes using Alt-] and Alt-[ | |
bind -n M-] select-pane -t :.+ | |
bind -n M-[ select-pane -t :.- | |
# switch windows using Alt-1, Alt-2, etc. | |
bind -n M-1 select-window -t 1 | |
bind -n M-2 select-window -t 2 | |
bind -n M-3 select-window -t 3 | |
bind -n M-4 select-window -t 4 | |
bind -n M-5 select-window -t 5 | |
bind -n M-6 select-window -t 6 | |
bind -n M-7 select-window -t 7 | |
bind -n M-8 select-window -t 8 | |
bind -n M-9 select-window -t 9 | |
# start window numbering at 1 | |
set -g base-index 1 | |
# new window using Alt-t | |
bind -n M-t new-window | |
# enable mouse control (clickable windows, panes, resizable panes) | |
set -g mouse on | |
# enable clipboard integration | |
set -s set-clipboard on | |
# enable vi mode | |
setw -g mode-keys vi | |
# vim-like copying | |
bind-key -T copy-mode-vi v send-keys -X begin-selection | |
bind-key -T copy-mode-vi y send-keys -X copy-selection | |
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle | |
# otherwise it takes 500ms to register escape key | |
set -sg escape-time 0 | |
# DESIGN TWEAKS | |
# don't do anything when a 'bell' rings | |
set -g visual-activity off | |
set -g visual-bell off | |
set -g visual-silence off | |
setw -g monitor-activity off | |
set -g bell-action none | |
# clock mode | |
setw -g clock-mode-colour brightred | |
# copy mode | |
setw -g mode-style 'fg=black bg=brightyellow bold' | |
# panes | |
set -g pane-border-style 'fg=colour237' | |
set -g pane-active-border-style 'fg=brightyellow' | |
# statusbar | |
set -g status-position bottom | |
set -g status-justify left | |
set -g status-style 'bg=colour237 fg=colour223' | |
set -g status-left '' | |
set -g status-left-length 10 | |
set -g status-right-style 'fg=black bg=brightyellow' | |
set -g status-right ' #{cpu_icon} #{cpu_percentage} | #{ram_icon} #{ram_percentage} | #H ' | |
set -g status-right-length 50 | |
# window status | |
setw -g window-status-current-style 'fg=black bg=brightyellow bold' | |
setw -g window-status-current-format ' #I #W #F ' | |
setw -g window-status-style 'fg=colour246 bg=colour237' | |
setw -g window-status-format ' #I #[fg=colour223]#W #[fg=brightyellow]#F ' | |
setw -g window-status-bell-style 'fg=black bg=red bold' | |
# messages | |
set -g message-style 'fg=black bg=brightyellow bold' | |
# run tmux plugin manager | |
run '~/.tmux/plugins/tpm/tpm' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment