Skip to content

Instantly share code, notes, and snippets.

@ourway
Created June 7, 2025 17:38
Show Gist options
  • Save ourway/301496229f26d133b7c5db4264dba00e to your computer and use it in GitHub Desktop.
Save ourway/301496229f26d133b7c5db4264dba00e to your computer and use it in GitHub Desktop.
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
is_fzf="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?fzf$'"
unbind C-b
set -g prefix C-a
bind-key C-a last-window
bind-key e send-prefix
set -g @plugin 'tmux-plugins/tpm'
#set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'dracula/tmux'
set -sg escape-time 0
set -g history-limit 300000
bind-key r source-file ~/.tmux.conf
set -g default-command /bin/zsh
setw -g alternate-screen on
#new-session -n $HOST
set -g bell-action none
bind m set monitor-activity
bind y set synchronize-panes\; display 'synchronize-panes #{?synchronize-panes,on,off}'
set -g base-index 1
setw -g pane-base-index 1
# address vim mode switching delay (http://superuser.com/a/252717/65504)
set -s escape-time 0
# increase scrollback buffer size
set -g history-limit 50000
# tmux messages are displayed for 1 second
set -g display-time 1000
# refresh 'status-left' and 'status-right' more often
set -g status-interval 1
# upgrade $TERM
set -g default-terminal "tmux-256color"
set-option default-terminal "tmux-256color"
set-option -a terminal-overrides ",*256col*:RGB"
# emacs key bindings in tmux command prompt (prefix + :) are better than
# vi keys, even for vim users
set -g status-keys emacs
set-window-option -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# focus events enabled for terminals that support them
set -g focus-events on
# super useful when using "grouped sessions" and multi-monitor setup
setw -g aggressive-resize on
set -g @dracula-show-timezone false
set -g @dracula-military-time true
set -g @dracula-show-powerline true
set -g @dracula-show-flags true
set -g @dracula-plugins "cpu-usage ram-usage time"
set -g @dracula-cpu-usage-colors "pink dark_gray"
set -g @dracula-refresh-rate 1
set -g @dracula-show-fahrenheit false
set -g @dracula-show-location false
# Pane border styling for better visibility
set -g pane-border-style 'fg=colour240,bg=colour235'
set -g pane-active-border-style 'fg=colour51,bg=colour236'
# Make active pane more prominent
set -g window-style 'fg=colour247,bg=colour236'
set -g window-active-style 'fg=colour250,bg=black'
# Optional: Add pane border status (shows pane title)
set -g pane-border-status top
set -g pane-border-format ' #{pane_index} #{pane_current_command} '
run '~/.tmux/plugins/tpm/tpm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment