Skip to content

Instantly share code, notes, and snippets.

@alexadhy
Created March 21, 2022 03:14
Show Gist options
  • Save alexadhy/e190f4ae8211051175f763c0459b4e29 to your computer and use it in GitHub Desktop.
Save alexadhy/e190f4ae8211051175f763c0459b4e29 to your computer and use it in GitHub Desktop.
tmux.conf
############################
# ░▀█▀░█▄█░█░█░█░█░█▀▄░█▀▀ #
# ░░█░░█░█░█░█░▄▀▄░█▀▄░█░░ #
# ░░▀░░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀▀ #
############################
#Basics & Prefix keys
unbind C-b
set -g prefix C-a
bind-key C-a send-prefix
set -sg escape-time 0
set -g mode-keys vi
set -g status-keys vi
set -g default-terminal screen-256color
set-option -sa terminal-overrides ',xterm-256color*:RGB'
set-option -ga terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
set-option -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
set-option -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours
set -g focus-events on
# Movement control
bind c copy-mode
bind t set status
bind h select-pane -L
bind n select-pane -D
bind e select-pane -U
bind i select-pane -R
bind ^h resize-pane -L 5
bind ^n resize-pane -D 5
bind ^e resize-pane -U 5
bind ^i resize-pane -R 5
# Colemak bindings
bind-key -T copy-mode-vi n send-keys -X cursor-down
bind-key -T copy-mode-vi e send-keys -X cursor-up
bind-key -T copy-mode-vi i send-keys -X cursor-right
bind-key -T copy-mode-vi k send-keys -X search-again
bind-key -T copy-mode-vi K send-keys -X search-reverse
bind-key -T copy-mode-vi j send-keys -X next-word-end
bind-key -T copy-mode-vi J send-keys -X next-space-end
bind-key -T choice-mode n send-keys -X down
bind-key -T choice-mode e send-keys -X up
bind-key -T choice-mode c-n send-keys -X choose
bind-key -T edit-mode-vi c-n send-keys -X enter
# bind F12 select-pane -t 12
#
#
# # Creation control
unbind c
bind-key Enter new-window
bind-key s split-window
bind-key v split-window -h
# # Other binds
bind-key r source $XDG_CONFIG_HOME/tmux/tmux.conf
bind-key X kill-session
bind-key m choose-window
bind c copy-mode
#+--- tmux-prefix-highlight ---+
set -g @prefix_highlight_output_prefix "#[fg=brightcyan]#[bg=black]#[nobold]#[noitalics]#[nounderscore]#[bg=brightcyan]#[fg=black]"
set -g @prefix_highlight_output_suffix ""
set -g @prefix_highlight_copy_mode_attr "fg=brightcyan,bg=black,bold"
#+--- battery colors ---+
set -g @batt_color_charge_primary_tier8 brightgreen
set -g @batt_color_charge_primary_tier7 brightgreen
set -g @batt_color_charge_primary_tier6 brightgreen
set -g @batt_color_charge_primary_tier5 brightgreen
set -g @batt_color_charge_primary_tier4 yellow
set -g @batt_color_charge_primary_tier3 yellow
set -g @batt_color_charge_primary_tier2 brightyellow
set -g @batt_color_charge_primary_tier1 red
#+--- battery charge icon ---+
set -g @batt_icon_charge_tier8 
set -g @batt_icon_charge_tier7 
set -g @batt_icon_charge_tier6 
set -g @batt_icon_charge_tier5 
set -g @batt_icon_charge_tier4 
set -g @batt_icon_charge_tier3 
set -g @batt_icon_charge_tier2 
set -g @batt_icon_charge_tier1 
# # Status Bar
set -g status-bg black
set -g status-fg white
set -g status-interval 6
# set -g status-left "#[fg=black,bg=brightcyan,bold] #S #[fg=brightcyan,bg=black,nobold,noitalics,nounderscore] "
set -g status-left "#{?client_prefix,#[bg=brightcyan]} #[fg=brightwhite,bold]#S #[fg=brightcyan,bg=default,nobold,noitalics,nounderscore] "
set -g status-right "#{prefix_highlight}#[fg=brightblue,bg=black,nobold,noitalics,nounderscore]#[fg=black,bg=brightblue,bold]🕜 #[fg=white,bg=brightblack] %H:%M #[fg=brightblack,bg=default,nobold,noitalics,nounderscore] #{battery_color_charge_fg}#{battery_color_charge_bg}#{battery_icon_charge} #[fg=white,bg=brightblack] #{battery_percentage} "
set -g status-justify left
set-option -g status-position bottom
#+-------+
#+ Panes +
#+-------+
set -g display-panes-colour black
set -g display-panes-active-colour brightblack
# Popup
set -g window-status-format "#[fg=gray,bg=black,nobold,noitalics,nounderscore]#[fg=black,bg=gray]#I #[fg=white,bg=brightblack] #T #[fg=brightblack,bg=default,nobold,noitalics,nounderscore] "
set -g window-status-current-format "#[fg=magenta,bg=black,bold,noitalics,nounderscore]#[fg=black,bg=magenta]#I #[fg=white,bg=brightblack] #T #[fg=brightblack,bg=default,nobold,noitalics,nounderscore]"
set -g window-status-separator ""
# Highlighting the active window in status bar
setw -g window-status-current-style "fg=default,bg=default"
setw -g window-status-style "bg=default,fg=white"
# Shhhhhh
setw -g monitor-activity on
setw -g clock-mode-colour cyan
set -g visual-activity off
set -g set-titles-string '#{pane_title}'
# TPM plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-battery'
# Plugins config
# set -g @continuum-restore 'off'
set-option -g history-limit 100000
# init TPM
run '$XDG_CONFIG_HOME/tmux/plugins/tpm/tpm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment