Skip to content

Instantly share code, notes, and snippets.

@NikhilNarayana
Last active June 6, 2024 17:28
Show Gist options
  • Save NikhilNarayana/deb97fda9ea49c078d4be4d807283c36 to your computer and use it in GitHub Desktop.
Save NikhilNarayana/deb97fda9ea49c078d4be4d807283c36 to your computer and use it in GitHub Desktop.
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# rebind prefix to ctrl+s
unbind C-b
set -g prefix C-s
bind C-s send-prefix
# allow holding ctrl while pressing s + p/n
bind C-p previous-window
bind C-n next-window
bind C-d detach-client
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# set status bar to top
set-option -g status-position top
# don't rename windows automatically
set-option -g allow-rename off
set -g base-index 1 # start windows numbering at 1
setw -g pane-base-index 1 # make pane numbering consistent with windows
set -g renumber-windows on # renumber windows when a window is closed
set -g mouse on
# sane scrolling:
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'"
bind R source-file "~/.tmux.conf"
# themeing
set -g @plugin "catppuccin/tmux"
set -g @catppuccin_flavour "frappe" # latte,frappe, macchiato or mocha
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " █"
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W"
set -g @catppuccin_status_modules_right "date_time"
set -g @catppuccin_status_left_separator ""
set -g @catppuccin_status_right_separator " "
set -g @catppuccin_status_fill "all"
set -g @catppuccin_status_connect_separator "yes"
set -g @catppuccin_directory_text "#{pane_current_path}"
set -g @catppuccin_window_current_color "#{thm_green}"
set -g @catppuccin_window_current_background "#{thm_bg}"
# save session periodically and restore on reboot
set -g @continuum-restore 'on'
# 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