Skip to content

Instantly share code, notes, and snippets.

@sean-d
Created August 8, 2022 18:55
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 sean-d/b286a1c088a866f0a82093514d717c86 to your computer and use it in GitHub Desktop.
Save sean-d/b286a1c088a866f0a82093514d717c86 to your computer and use it in GitHub Desktop.
tmux conf
# Set default terminal
set-option default-terminal "tmux-256color"
set-option -a terminal-overrides ",*256col*:RGB"
# Remap b to space to make the prefix less inury prone. this isn't emacs afterall.
unbind C-b
set -g prefix C-Space
bind Space send-prefix
# give a tad more time to enter the stupid combos before tmux makes you start over.
set -s escape-time 5
# All the history
set -g history-limit 5000
# Because OCD is a thing; reload config with r
unbind r
bind r \
source-file ~/.tmux.conf \;\
display 'Reloaded tmux config'
# Split windows using | and - instead of "%. Who remembers this shit? Also create splits in the PWD of the active buffer
unbind '"'
unbind %
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# Use shift + arrow key to move between windows in a session
bind -n S-Left previous-window
bind -n S-Right next-window
# Switch betewen panes using alt + arrow
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# allow mouse to select windows and panes
set-option -g mouse on
# don't allow tmux to rename the window based on commands running
set-window-option -g allow-rename off
# make scrolling with wheels work
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
# Weather Stuff
set-option -g @tmux-weather-interval 10
set-option -g @tmux-weather-location "Pahoa"
set-option -g @tmux-weather-units "u"
# =====================
# Status Bar Stuff
# =====================
# refresh status every 1 seconds
set -g status-interval 1
set -g status-bg 'colour235'
#message related
set -g message-style fg=colour222,bg=colour238
set -g message-command-style fg=colour222,bg=colour238
#window related
setw -g window-status-separator ''
setw -g window-status-style fg=colour121,bg=colour235,none
#pane related
set -g pane-border-style fg=colour208,bg=default
set -g pane-active-border-style fg=colour208,bg=colour154
set -g pane-border-format "#{pane_index} #{pane_current_command}"
set -g pane-border-status bottom
# status related
set -g status-justify 'centre'
set -g status-left-length '100'
set -g status 'on'
set -g status-right-length '100'
#set -g status-left '#[fg=colour232,bg=colour154] #S #[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #W #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] #(whoami)  #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
set -g status-left '#[fg=colour232,bg=colour154] #S #[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #W #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
set -g status-right '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] %r  %a  %Y #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #{network_bandwidth} #[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour232,bg=colour154] #{weather} '
setw -g window-status-format '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[default] #I  #W #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
setw -g window-status-current-format '#[fg=colour235,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #I  #W  #F #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]'
# PLUGIN EXTRAVAGANZA
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tpm-spotify \
tmux-plugins/tmux-resurrect \
xamut/tmux-spotify \
xamut/tmux-weather \
xamut/tmux-network-bandwidth \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-continuum \
yardnsm/tmux-1password
'
# 1Password Stuff
set -g @1password-account 'kexp_techops'
set -g @1password-copy-to-clipboard 'on'
# set -g @1password-debug '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