Skip to content

Instantly share code, notes, and snippets.

@chanshing
Last active August 5, 2024 12:27
Show Gist options
  • Save chanshing/f108cff204504d7438bc1d4cbac9dbf7 to your computer and use it in GitHub Desktop.
Save chanshing/f108cff204504d7438bc1d4cbac9dbf7 to your computer and use it in GitHub Desktop.
tmux configuration file
# List of plugins
# Make sure install tpm:
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Allows for faster key repetition
# NOTE: Don't set this to zero: https://github.com/microsoft/WSL/issues/5931
set -sg escape-time 10
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
setw -g mode-keys vi
setw -g mode-mouse on # <2.1
# set -g mouse on # >=2.1
setw -g monitor-activity on
set -g visual-activity on
unbind-key C-b # free the original bind-key key
set-option -g prefix C-a # setting the prefix from C-b to C-a
bind-key C-a send-prefix # ensure that we can send Ctrl-A to other apps or the shell that your interacting
# C-[h,j,k,l] to change pane
bind-key -n C-h select-pane -L
bind-key -n C-l select-pane -R
bind-key -n C-k select-pane -U
bind-key -n C-j select-pane -D
# Resize pane
bind-key -n M-j resize-pane -D
bind-key -n M-k resize-pane -U
bind-key -n M-h resize-pane -L
bind-key -n M-l resize-pane -R
bind-key -n C-o resize-pane -Z
# Set window split
bind-key v split-window -h
bind-key b split-window
# Prompt color
set -g default-terminal "xterm-256color"
# Keep this at the bottom
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
# GitHub Dark High Contrast Theme
# Set inactive/active window
set -g window-style 'fg=colour255,bg=colour235'
set -g window-active-style 'fg=colour255,bg=colour232'
# Set pane border colors
set -g pane-border-style 'fg=colour236,bg=colour235'
set -g pane-active-border-style 'fg=colour81,bg=colour234'
# # Light Theme
# # Set inactive/active window styles
# set -g window-style 'fg=colour246,bg=colour223' # Soft foreground on a light background
# set -g window-active-style 'fg=colour235,bg=colour230' # More contrast for the active window
# # Set the pane border colors
# set -g pane-border-style 'fg=colour244,bg=colour223' # Lighter border for inactive panes
# set -g pane-active-border-style 'fg=colour167,bg=colour230' # Accent color for active pane borders
# ------------------------------------------------------------------------------------------------------------------------------------
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
@chanshing
Copy link
Author

default to dark theme; update values for more contrast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment