Skip to content

Instantly share code, notes, and snippets.

@huytd
Created September 27, 2019 22:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huytd/f0146b58c0fa5c7ba8fa8363c9356643 to your computer and use it in GitHub Desktop.
Save huytd/f0146b58c0fa5c7ba8fa8363c9356643 to your computer and use it in GitHub Desktop.
My 2019 Tmux Config
# set -g default-terminal "xterm"
# set-option -ga terminal-overrides ",xterm:Tc"
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -g prefix C-x
unbind-key C-x
bind-key C-2 send-prefix
bind \ split-window -h -c '#{pane_current_path}'
bind / split-window -v -c '#{pane_current_path}'
# move around panes with j and k, a bit like vim
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind r source-file ${HOME}/.tmux.conf \; display-message "Config reloaded"
set -g -q mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
setw -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
set -g escape-time 0
set -g status-interval 60
set -g status-right-length 200
set -g status-left-length 200
set -g status-right ''
set -g status-left '#[fg=white] %H:%M #[fg=brightblack]%m-%d-%Y '
set -g pane-border-style fg=brightblack
set -g pane-active-border-style fg=brightblack
set -g window-active-style bg=default
set -g status-justify right
set -g status-fg brightblack
set -g status-bg default
set -g window-status-current-format "#{?window_zoomed_flag,#[bg=colour4],#[bg=colour15,fg=colour0]} #W #{?window_zoomed_flag,#[bg=colour15],#[bg=colour5,fg=colour0]}"
@amrutadotorg
Copy link

amrutadotorg commented Aug 14, 2023

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