Last active
July 16, 2021 18:13
-
-
Save alchen99/4b25de8fc61b69a0f9cd90a840785d81 to your computer and use it in GitHub Desktop.
Tmux configuration
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
# make CTRL+a the 'prefix' ala screen. | |
bind C-a send-prefix | |
set -g prefix C-a | |
# get rid of the tmux standard of CTRL+b | |
unbind C-b | |
set -s escape-time 1 | |
set -g base-index 1 | |
setw -g pane-base-index 1 | |
set -g history-limit 50000 | |
# GNU Screen Window cycling | |
bind a last-window | |
bind C-p previous-window | |
bind C-n next-window | |
# make it easy to reload the config (CTRL+r) | |
bind r source-file ~/.tmux.conf \; display "Config reloaded!" | |
# HA! SEE THIS SCREEN? WE CAN SPLIT BOTH WAYS WITHOUT BREAKING VERSIONS. | |
bind | split-window -h | |
bind - split-window -v \; select-layout -n \; select-layout -p | |
# and it was said... GIVE ME VI BINDINGS | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
bind -r C-h select-window -t :- | |
bind -r C-l select-window -t :+ | |
# make it bigger, make it smaller | |
bind -r H resize-pane -L 5 | |
bind -r J resize-pane -D 5 | |
bind -r K resize-pane -U 5 | |
bind -r L resize-pane -R 5 | |
#disabling mouse mode just to force myself to learn more of the commands | |
#setw -g mode-mouse off | |
#set -g mouse-select-pane off | |
#set -g mouse-resize-pane off | |
#set -g mouse-select-window off | |
#setting the colors | |
set -g status-fg white | |
set -g status-bg black | |
setw -g window-status-style bg=default,fg=cyan,dim | |
setw -g window-status-current-style bg=blue,fg=white,bright | |
# moar colorz | |
set -g pane-border-style fg=green,bg=black | |
set -g pane-active-border-style fg=black,bg=green | |
set -g allow-rename off | |
set -g status-left-length 40 | |
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P" | |
# we live in the 21st century. people besides americans use computers. | |
# get used to it. | |
#set -g status-utf8 on | |
# no more front and back, side to side. keep it centered. | |
set -g status-justify centre | |
setw -g monitor-activity on | |
set -g visual-activity on | |
# Aggressive resize | |
# super useful when using "grouped sessions" and multi-monitor setup | |
setw -g aggressive-resize on | |
# keep envs from the desktop to allow for better forwarding | |
set-option -g update-environment 'DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY DBUS_SESSION_BUS_ADDRESS' | |
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-continuum' | |
set -g @continuum-restore 'on' | |
# Other examples: | |
# set -g @plugin 'github_username/plugin_name' | |
# set -g @plugin 'git@github.com:user/plugin' | |
# set -g @plugin 'git@bitbucket.com:user/plugin' | |
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
run '~/.tmux/plugins/tpm/tpm' |
5th version is compatible with 2.9.x.
- Replace -fg/-bg/-attr options with -style
- See tmux/tmux#1689
- tmux/tmux#1689 (comment)
- https://gist.github.com/tbutts/6abf7fb5b948c066bf180922fb37adcf
- https://gitlab.com/fernandobasso/dotfiles/commit/af2c0ac59b93b318575367f0313ad1ca0627a6ba
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
4th version is compatible with 2.8.x