Skip to content

Instantly share code, notes, and snippets.

@anggakharisma
Last active May 4, 2024 15:01
Show Gist options
  • Save anggakharisma/4a3cec08f3eeee4e4a1d2e495c6f4024 to your computer and use it in GitHub Desktop.
Save anggakharisma/4a3cec08f3eeee4e4a1d2e495c6f4024 to your computer and use it in GitHub Desktop.
Tmux configuration
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# 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'
setw -g mode-keys vi
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
set -as terminal-features ",*:RGB"
set -ag terminal-overrides ",xterm-256color:RGB"
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
bind r source-file ~/.tmux.conf
bind-key C-Tab next-window
bind-key C-S-Tab previous-window
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -r K resize-pane -U 2
bind-key -r J resize-pane -D 2
bind-key -r H resize-pane -L 2
bind-key -r L resize-pane -R 2
bind-key Tab next-window
bind-key C-a last-window
set -g mouse on
bind c new-window -c "#{pane_current_path}"
bind-key _ split-window -v -c "#{pane_current_path}"
bind-key | split-window -h -c "#{pane_current_path}"
set-option -g status-style bg=default
set -g visual-activity off
set -g visual-bell off
set -g visual-silence off
set -g bell-action none
setw -g monitor-activity off
set -g status-position top
set -g status-interval 40
set -g status-justify left
set -g status-left ""
# set-option -g status-right "#[default]#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --colors -p -v -m 2 --interval 2)#[default]"
set-option -g status-right " %H:%M %a #[fg=blue]%Y-%m-%d"
set -g status-right-length 140
set -g status-left-length 10
setw -g window-status-current-style 'fg=blue bg=default bold'
setw -g window-status-current-format ' #I #W 󰬸'
setw -g window-status-style 'fg=white dim'
setw -g window-status-format ' #I #W '
set -g pane-active-border-style bg=default,fg=magenta
set -g pane-border-style fg=blue
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
bind C-c new-session
set-option -g renumber-windows on
set -g @resurrect-save 'S'
set -g @resurrect-restore 'R'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment