Skip to content

Instantly share code, notes, and snippets.

@usirin
Created January 2, 2024 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save usirin/9cccf5ec736bf407310b47f0d028b872 to your computer and use it in GitHub Desktop.
Save usirin/9cccf5ec736bf407310b47f0d028b872 to your computer and use it in GitHub Desktop.
# Address vim mode switching delay (http://superuser.com/a/252717/65504)
set -s escape-time 0
set -g history-limit 50000
set -g display-time 4000
set -g status-interval 5
set -g status-keys emacs
set -g focus-events on
setw -g aggressive-resize on
setw -g mouse
setw -g mode-keys vi
set -g default-terminal "xterm-kitty"
# set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",*256col*:Tc"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # support for underline colors in kitty
# keybinds
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind N new-window
bind r display "Reloading config... " \; source-file ~/.tmux.conf \; display "Config Reloaded!"
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# make window/pane index start with 1
set -g base-index 1
setw -g pane-base-index 1
# tmux plugin manager plugins
set -g @plugin 'tmux-plugins/tpm'
# status bar
set -g status-justify centre
set -g status-left-length 60
set -g status-right-length 60
set -g status-style bg=black,fg=white
set -g window-status-current-style underscore
setw -g window-status-current-format '#I:#W:#F'
setw -g window-status-format '#I:#W:#F'
# session utils
# prefix + C -> create session
# prefix + X -> kill session
set -g @plugin 'tmux-plugins/tmux-sessionist'
# tmux plugins to handle sessions like a boss
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @resurrect-strategy-nvim 'session'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-open' # Open links from tmux - Select path and press o
# tmux-pomodoro
set -g @plugin 'olimorris/tmux-pomodoro-plus'
set -g @pomodoro_on " #[fg=orange] "
set -g @pomodoro_complete " #[fg=green]✔︎ "
set -g @pomodoro_pause " #[fg=yellow]⏸︎ "
set -g @pomodoro_prompt_break " #[fg=green] ?"
set -g @pomodoro_prompt_pomodoro " #[fg=red] ?"
set -g @pomodoro_interval_display " #[fg=gray]#[fg=italics]%s/%s "
set -g status-right "#{pomodoro_status}"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment