Last active
August 22, 2020 09:41
-
-
Save zenja/9ab7b61cff235cb43096a0b6fb046d51 to your computer and use it in GitHub Desktop.
My tmux config file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set prefix key to Ctrl-a | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# reload settings | |
unbind r | |
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..." | |
# Ctrl-j/k cycles thru windows (no prefix) | |
unbind C-j | |
unbind C-k | |
bind-key -n "C-k" select-window -t :- | |
bind-key -n "C-j" select-window -t :+ | |
# switch panes using Alt-arrow without prefix | |
bind -n M-h select-pane -L | |
bind -n M-l select-pane -R | |
bind -n M-k select-pane -U | |
bind -n M-j select-pane -D | |
# also enable vim movement bindings | |
set-window-option -g mode-keys vi | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
# Ctrl - t new window | |
unbind C-t | |
bind-key -n C-t new-window | |
# enable mouse mode (tmux 2.1 and above) | |
set -g mouse on | |
# don't rename windows automatically | |
set-option -g allow-rename off | |
# colors | |
set -g default-terminal "screen-256color" | |
# start window numbering at 1 for easier switching | |
set -g base-index 1 | |
# key bindings for horizontal and vertical panes | |
unbind % | |
bind | split-window -h | |
unbind '"' | |
bind - split-window -v | |
# listen to alerts from all windows | |
set -g bell-action any | |
###################### | |
### DESIGN CHANGES ### | |
###################### | |
# Ref: https://cassidy.codes/blog/2019-08-03-tmux-colour-theme/ | |
# pane border | |
set -g pane-border-style fg='#6272a4' | |
set -g pane-active-border-style fg='#ff79c6' | |
# message text | |
set -g message-style bg='#44475a',fg='#8be9fd' | |
# status line | |
set -g status-style bg='#44475a',fg='#bd93f9' | |
set -g status-interval 1 | |
# status left | |
# are we controlling tmux or the content of the panes? | |
set -g status-left '#[bg=#f8f8f2]#[fg=#282a36]#{?client_prefix,#[bg=#ff79c6],} ☺ ' | |
# are we zoomed into a pane? | |
set -ga status-left '#[bg=#44475a]#[fg=#ff79c6] #{?window_zoomed_flag, ↕ , }' | |
# window status | |
set-window-option -g window-status-style fg='#bd93f9',bg=default | |
set-window-option -g window-status-current-style fg='#ff79c6',bg='#282a36' | |
set -g window-status-current-format "#[fg=#44475a]#[bg=#bd93f9]#[fg=#f8f8f2]#[bg=#bd93f9] #I #W #[fg=#bd93f9]#[bg=#44475a]" | |
set -g window-status-format "#[fg=#f8f8f2]#[bg=#44475a]#I #W #[fg=#44475a] " | |
# status right | |
set -g status-right '#[fg=#8be9fd,bg=#44475a]#[fg=#44475a,bg=#8be9fd] #(tmux-mem-cpu-load -g 5 --interval 2) ' | |
set -ga status-right '#[fg=#ff79c6,bg=#8be9fd]#[fg=#44475a,bg=#ff79c6] #(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") ' | |
set -ga status-right '#[fg=#bd93f9,bg=#ff79c6]#[fg=#f8f8f2,bg=#bd93f9] %a %H:%M:%S #[fg=#6272a4]%Y-%m-%d ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment