Skip to content

Instantly share code, notes, and snippets.

@jonbakerfish
Last active July 12, 2023 06:13
Show Gist options
  • Save jonbakerfish/a16b80648d8af77e205362577ac6ccf2 to your computer and use it in GitHub Desktop.
Save jonbakerfish/a16b80648d8af77e205362577ac6ccf2 to your computer and use it in GitHub Desktop.
Tmux Conf
set-option -g default-shell /bin/zsh
set -g base-index 1
set -g prefix C-b
set-option -g history-limit 5000
set-window-option -g mode-keys vi
set -g display-panes-time 8000 #8s
set -g default-terminal "screen-256color"
bind r source-file ~/.tmux.conf
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
bind-key -n C-Left swap-window -d -t -1
bind-key -n C-Right swap-window -d -t +1
## utf8
#setw -gq utf8 on
#set -gq status-utf8 on
#################################################33
# THEME
set status-style "bg=#1c1c1c"
set -g status-bg black
set -g status-fg white
set -g status-interval 60
set -g status-left-length 60
set -g status-left '#[fg=green](#S) #(whoami) '
set -g status-right-length 70
#set -g status-right '#{battery_status_fg}Batt #{battery_icon_status} #[default] #{cpu_fg_color}CPU#{cpu_icon}#{cpu_percentage}#[default] #{ram_fg_color}RAM#{ram_icon}#{ram_percentage}#[default] #[fg=white]%l:%M %p#[default]'
set -g status-right '#{battery_status_fg}Batt #{battery_percentage} #[default] #{cpu_fg_color}CPU#{cpu_icon} #{cpu_percentage}#[default] #{ram_fg_color}RAM#{ram_icon} #{ram_percentage}#[default] #[fg=white]%l:%M %p#[default]'
# for error displaying
#set -g pane-active-border-style fg=green
#set -g pane-border-style default
#set -g status on
#set -g status-bg grey
#######################################################
#bind-key -n C-S-Up resize-pane -U 15
#bind-key -n C-S-Down resize-pane -D 15
#bind-key -n C-S-Left resize-pane -L 25
#bind-key -n C-S-Right resize-pane -R 25
##################################################
### Mouse On/Off ### {{{
## Mouse On by default
set -g mouse on
##Toggle mouse on with <prefix>m
bind m \
set -g mouse on \;\
display 'Mouse: ON'
## Toggle mouse off with <prefix>M
bind M \
set -g mouse off \;\
display 'Mouse: OFF'
### End Mouse On/Off ### }}}
set -g @resurrect-processes 'nvidia-smi watch ss-local'
##################################################
# First install: git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# then bind + I to install plugins
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-resurrect'
#set -g @resurrect-save-bash-history 'on'
set -g @continuum-restore 'on'
# must be the last
set -g @plugin 'tmux-plugins/tmux-continuum'
# Initializes TMUX plugin manager.
# Keep this line at the very bottom of tmux.conf.
run-shell '~/.tmux/plugins/tpm/tpm'
display 'tmux.conf refresh'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment