Skip to content

Instantly share code, notes, and snippets.

@ldelelis
Created February 26, 2020 23:31
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 ldelelis/bc0d7d11c0d4c7576d90e64c2d9f4733 to your computer and use it in GitHub Desktop.
Save ldelelis/bc0d7d11c0d4c7576d90e64c2d9f4733 to your computer and use it in GitHub Desktop.
personalized tmux conf forked from https://github.com/taigacute
# Author :taigacute
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-urlview'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'samoshkin/tmux-plugin-sysstat'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_copy_mode_attr 'fg=white,bg=blue'
set -g @continuum-save-interval '15'
set -g @sysstat_mem_view_tmpl 'MEM: #[fg=#{mem.color}]#{mem.pused} (#{mem.used})#[default]'
set -g default-terminal 'tmux-256color'
# Add truecolor support
set -as terminal-overrides ',xterm*:Tc:sitm=\E[3m'
set -g set-clipboard on
# Index starts from 1
set-option -g base-index 1
setw -g pane-base-index 1 # make pane numbering consistent with windows
setw -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
set -g set-titles-string '#h ❐ #S ● #I #W'
setw -g monitor-activity on
set -g visual-activity on
set -g history-limit 102400 # scrollback buffer n lines
set -g mode-keys vi # user vi mode
set -g repeat-time 0
setw -g aggressive-resize on
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 -r C-h select-window -t :-
bind -r C-l select-window -t :+
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
set -s escape-time 1
bind r source-file ~/.tmux.conf \; display "Configuration Reloaded"
set-window-option -g window-status-format '#[bg=colour238]#[fg=colour107] #I #[bg=colour239]#[fg=colour110] #[bg=colour240]#W#[bg=colour239]#[fg=colour195]#F#[bg=colour238] '
set-window-option -g window-status-current-format '#[bg=colour236]#[fg=colour215,bold] #I:#[bg=colour235]#[fg=colour167] #[bg=colour234]#W#[bg=colour235]#[fg=colour195]#F#[bg=colour236] '
setw -g window-status-style dim
set -g pane-border-style fg="colour237"
set -g pane-active-border-style fg="colour240"
set -g message-style 'fg=colour168, bg=colour237 bright'
tmux_bg_color='#3c3836'
tmux_fg_color='#a89984'
tmux_high_contrast='fg=#282828,bg=#83a598,bold'
tmux_normal_contrast='fg=#282828,bg=#fabd2f,nobold'
tmux_low_contrast='fg=#ebdbb2,bg=#504945'
sep='#[fg=#504945]│#[default]'
set -g status-bg $tmux_bg_color
set -g status-fg $tmux_fg_color
set -g status-left-length 150
set -g status-left " #[fg=#b8bb26]%b-%d %a $sep #[fg=#b8bb26]%H:%M $sep  #[fg=colour172]#[fg=colour172]#S $sep"
set -g status-right-length 180
set -g status-right " #{?client_prefix,🐠,} $sep #[fg=#58F27B]#{sysstat_cpu} $sep #{sysstat_mem} $sep  ldelelis"
set -g status-justify centre
set -g status-interval 60
# https://github.com/neovim/neovim/wiki/FAQ#cursor-shape-doesnt-change-in-tmux
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
# Move status bar to the top
set-option -g status-position bottom
run '~/.tmux/plugins/tpm/tpm'
# my stuff
set -g mouse on
set -g prefix C-q
unbind C-b
unbind '"'
unbind %
unbind C-f
unbind z
unbind C-c
# pane cycling like C-w C-w in vim
bind C-q select-pane -t :.+
# Sane zoom
bind C-f resize-pane -Z
# I don't use sessions so a new session bind is useless to me
bind C-c new-window
# Alt-tab-ish behaviour
bind Tab last-window # move to last active window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment