# Keybindings ---------------------------------------------------------------- # Prefix unbind C-b set-option -g prefix ` bind-key ` send-prefix # Close|new|select windows and sessions bind X kill-window bind C-x kill-session bind n new-window bind N new-session bind s choose-window bind S choose-session # Switch windows bind [ previous-window bind ] next-window # Split windows to panes bind V split-window -h bind H split-window -v # Navigate panes bind j select-pane -D bind k select-pane -U bind h select-pane -L bind l select-pane -R # Resize panes bind -r C-j resize-pane -D 5 bind -r C-k resize-pane -U 5 bind -r C-h resize-pane -L 5 bind -r C-l resize-pane -R 5 # Reload tmux config bind R source-file ~/.tmux.conf \; display "Config reloaded" # Copy mode bind c copy-mode bind p paste-buffer # Mouse mode set -g mouse on # Appearance ----------------------------------------------------------------- # Enable 256 colours set-option -g default-terminal "tmux-256color" # Colours # See https://commons.wikimedia.org/wiki/File:Xterm_256color_chart.svg CLR1="#dfafff" # magenta CLR2="#dadada" # light grey 253 CLR3="#c6c6c6" # light grey 251 CLR4="#767676" # medium grey 243 CLR5="#6c6c6c" # medium grey 242 CLR6="#303030" # dark grey 236 CLR7="#262626" # dark grey 235 CLR8="#121212" # dark grey 233 CLR9="#e4e4e4" # light grey 254 CLR10="#875f87" # dark magenta # Cursor set-option -ag terminal-overrides ",tmux*:Cr=\E]12;$CLR1\007" # Panes set -g window-style "fg=$CLR2,bg=$CLR6" set -g window-active-style "fg=$CLR3,bg=$CLR7" # Status bar # Status refresh rate (s) set -g status-interval 60 set -g status-bg $CLR8 set -g status-fg $CLR2 # Simple style # To select a style, uncomment the "set -g" lines under the style # Uncomment only one set at a time SM_SESSION=" #[bold]#S " SM_TIME=" #[bold]%m/%d %H:%M " SM_USERS=" #(who | sort --key=1,1 --unique | wc -l) townies " SM_DISK=" ~#(whoami) #(du -hs $HOME | cut -f1 -d ' ') " SM_MAIL=" #(cat /var/spool/mail/$USER | grep ' ' && echo '✉')" SM_LEFT="#[fg=$CLR6,bg=$CLR1]$SM_SESSION" SM_WIN="#[fg=$CLR4,bg=$CLR8] #I #[fg=$CLR2,bg=$CLR8]#W " SM_WIN_CUR="#[fg=$CLR5,bg=$CLR6] #I #[fg=$CLR1,bg=$CLR6,bold]#W " SM_RIGHT=" #[fg=$CLR3]$SM_DISK $SM_MAIL $SM_USERS #[fg=$CLR6,bg=$CLR1]$SM_TIME" set -g status-left "$SM_LEFT" set -g window-status-format "$SM_WIN" set -g window-status-current-format "$SM_WIN_CUR" set -g status-right-length 50 set -g status-right "$SM_RIGHT" # Airline style AL_SESSION=" #[bold]⛁ #S " AL_TIME=" ⌚ #[bold]%b %d %H:%M " AL_USERS=" ⛑ #(who | sort --key=1,1 --unique | wc -l) townies " AL_DISK=" ⌂ #(du -hs $HOME | cut -f1 -d ' ') " SM_MAIL=" #(cat /var/spool/mail/$USER | grep ' ' && echo '✉') " AL_LEFT="#[fg=$CLR6,bg=$CLR1]$AL_SESSION#[fg=$CLR1,bg=$CLR8]" AL_WIN="#[fg=$CLR4,bg=$CLR8] #I #[fg=$CLR2,bg=$CLR8]#W #[fg=$CLR3,bg=$CLR8,bold] " AL_WIN_CUR="#[fg=$CLR8,bg=$CLR2,bold]#[fg=$CLR4,bg=$CLR2,bold] #I #[fg=$CLR8]#W #[fg=$CLR2,bg=$CLR8]" AL_RIGHT="#[fg=$CLR10,bg=$CLR8,bold]#[fg=$CLR9,bg=$CLR10] $AL_DISK $AL_MAIL $AL_USERS #[fg=$CLR1,bg=$CLR10]#[fg=$CLR6,bg=$CLR1,dim]$AL_TIME" #set -g status-left "$AL_LEFT" #set -g window-status-format "$AL_WIN" #set -g window-status-current-format "$AL_WIN_CUR" #set -g status-right-length 80 #set -g status-right "$AL_RIGHT"