Skip to content

Instantly share code, notes, and snippets.

@Santiago-j-s
Created December 18, 2020 18:23
Show Gist options
  • Save Santiago-j-s/d829f5247f774df8a9906eaefadab265 to your computer and use it in GitHub Desktop.
Save Santiago-j-s/d829f5247f774df8a9906eaefadab265 to your computer and use it in GitHub Desktop.
# https://github.com/hardcoreplayers/dotfiles/blob/master/tmux/.tmux.conf
# battery colors
set -g @batt_color_charge_secondary_tier8 'colour0'
set -g @batt_color_charge_secondary_tier7 'colour0'
set -g @batt_color_charge_secondary_tier6 'colour0'
set -g @batt_color_charge_secondary_tier5 'colour0'
set -g @batt_color_charge_secondary_tier4 'colour15'
set -g @batt_color_charge_secondary_tier3 'colour15'
set -g @batt_color_charge_secondary_tier2 'colour15'
set -g @batt_color_charge_secondary_tier1 'colour15'
set -g @batt_color_status_secondary_charged 'colour0'
set -g @batt_color_status_secondary_charging 'colour15'
set -g @batt_color_status_secondary_discharging 'colour15'
set -g @batt_color_status_secondary_attached 'colour0'
set -g @batt_color_status_secondary_unknown 'colour0'
# sysstat
set -g @sysstat_mem_view_tmpl 'MEM: #[fg=#{mem.color}]#{mem.used}#[fg=colour222] of #{mem.total}'
set -g @sysstat_cpu_view_tmpl 'CPU: #{cpu.pused} '
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'samoshkin/tmux-plugin-sysstat'
# zsh
set-option -g default-shell /bin/zsh
# color
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
# window status
set-option -g window-status-current-format '#[fg=colour235,bg=colour222] #W '
set-option -g window-status-format '#[fg=colour222,bg=colour235] #I:#W '
# status bar
set-option -g status-left '#[fg=colour232,bg=colour172] PWD:#{b:pane_current_path} '
set-option -g status-right '\
#{?client_prefix,🐠,} \
#[fg=colour222,bg=colour238,nobold,nounderscore,noitalics]#{sysstat_mem} #{sysstat_cpu} \
#{battery_color_bg} #{battery_icon_status} #{battery_percentage} '
#status style
set-option -g status-style fg=colour136,bg=colour239
set-option -g status-position top
set-option -g status-justify 'centre'
set-option -g status-left-length '100'
set-option -g status-right-length '100'
set-option -g message-style fg=colour222,bg=colour238
set-option -g message-command-style fg=colour222,bg=colour238
set -g pane-border-style fg=colour238
set -g pane-active-border-style fg=colour154
# counting from 1
set -g base-index 1
# remap prefix
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# reload config
bind r source-file ~/.tmux.conf \; display 'Configuration Reloaded'
# switch panes without prefix
bind h select-pane -L
bind j select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# mouse control
set -g mouse on
# don't rename windows automatically
set-option -g allow-rename off
# escape fast (especially for vim)
set -sg escape-time 0
# run tpm
run -b '~/.tmux/plugins/tpm/tpm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment