all repos — dotfiles @ 474a6f1e6a98f8fb35ab3af29f4eb746f7a6d592

linux dotfiles

tmux/tmux.conf

set-option -g prefix C-f
unbind-key C-b
bind-key C-f send-prefix
set escape-time 0

bind C-c new-session

# Easy config reload
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."

bind h select-pane -L 
bind j select-pane -D 
bind k select-pane -U 
bind l select-pane -R 
bind > swap-pane -D      
bind < swap-pane -U      

bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
bind -r o switch-client -l

bind -r C-h swap-window -t -1 \; previous-window
bind -r C-l swap-window -t +1 \; next-window
bind \; last-window
bind C-o rotate-window

setw -g mouse on

bind-key P command-prompt -p 'save history to filename:' -I '~/.cache/tmux.history' 'capture-pane -S - ; save-buffer %1 ; delete-buffer'

bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"

# smart pane switching with awareness of vim splits
# bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-h) || tmux select-pane -L"
# bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-j) || tmux select-pane -D"
# bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-k) || tmux select-pane -U"
# bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-l) || tmux select-pane -R"

# set -g default-terminal "tmux-256color"
# set -g terminal-overrides ",tmux-256color:Tc"
# set -as terminal-overrides ',st*:Ss@'
set -g default-terminal "screen-256color"

# Status update interval
# set -g status-interval 1

# Basic status bar colors
set -g status-style fg=colour250,bg=colour233

# Left side of status bar
set -g status-left-style bg=colour233,fg=colour243
set -g status-left-length 0
set -g status-left "#[fg=colour240] #S "
# set -g status-left "#[fg=colour232,bg=colour24,bold] #S #[fg=colour24,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour233,nobold]"

# Right side of status bar
set -g status-right-style bg=colour233,fg=colour243
set -g status-right-length 0
set -g status-right ""
# set -g status-right "#[fg=colour240] %a, %b %d | %I:%M %P "
# set -g status-right "#[fg=colour235,bg=colour233]#[fg=colour240,bg=colour235] %I:%M #[fg=colour240,bg=colour235]#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour245,bg=colour240]#[fg=colour232,bg=colour245,bold] #H "

# Window status
set -g window-status-format " #I:#W#F "
set -g window-status-current-format "#{?window_zoomed_flag,#[bg=#78a9ff],} #I:#W#F "

# Current window status
set -g window-status-current-style bg=colour253,fg=colour233

# Window with activity status
set -g window-status-activity-style bg=colour233,fg=colour31

# Window separator
set -g window-status-separator ""

# Window status alignment
set -g status-justify centre

set -g status-position bottom

# Pane border
set -g pane-border-style bg=default,fg=colour236

# Active pane border
set -g pane-active-border-style bg=default,fg=colour244

# Pane number indicator
set -g display-panes-colour colour233
set -g display-panes-active-colour colour245

# Clock mode
set -g clock-mode-colour colour24
set -g clock-mode-style 24

# Message
set -g message-style bg=colour233,fg=colour253

# Command message
set -g message-command-style bg=colour233,fg=black


# Mode
set -g mode-style bg=colour253,fg=colour233

# this allows the cursor to change when within st
# https://vi.stackexchange.com/questions/22224/change-neovim-cursor-in-insert-mode-under-st-simple-terminal-and-tmux
set -as terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[2 q'
set -sa terminal-overrides ",st*:Tc"