dotfiles/.config/tmux/tmux.conf

100 lines
2.3 KiB
Plaintext

# Start a session if none exists
new-session -s main
# Start htop and split window
set-hook -t main session-created 'send-keys -t main:0 "sudo htop" C-m; split-window'
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Use C-b to send prefix twice so it acts on nested session
bind-key -n C-b send-prefix
# split panes using # and -
bind "#" split-window -h
bind "-" split-window -v
unbind '"'
unbind %
# reload config file
bind r source-file $XDG_CONFIG_HOME/tmux/tmux.conf
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# start windows and panes at 1, not 0,
set -g base-index 1
set -g pane-base-index 1
# Enable mouse mode
set -g mouse on
#+---------+
#+ Options +
#+---------+
set -g status-interval 1
set -g status on
set -g aggressive-resize on
#+--------+
#+ Status +
#+--------+
#+--- Layout ---+
set -g status-justify left
#+--- Colors ---+
set -g status-bg black
set -g status-fg white
#+-------+
#+ Panes +
#+-------+
set -g pane-border-style bg=black,fg=brightblack
set -g pane-active-border-style bg=black,fg=magenta
set -g display-panes-colour black
set -g display-panes-active-colour brightblack
#+------------+
#+ Clock Mode +
#+------------+
setw -g clock-mode-colour cyan
#+----------+
#+ Messages +
#+---------+
set -g message-style fg=cyan,bg=brightblack
set -g message-command-style fg=cyan,bg=brightblack
######################
### DESIGN CHANGES ###
######################
## Status bar design
# status line
set -g status-justify left
set -g status-interval 1
set -g default-terminal "screen-256color"
#+--- Bars ---+
set -g status-left ''
## Indicate if prefix has been pressed
set -ga status-left '#[bg=#white]#[fg=#brightblack]#{?client_prefix,#[fg=red] ◯ , ◯ }'
## Session name
set -ga status-left "#S"
set -g status-right ''
# Date and time
set -ga status-right "#[fg=white,bg=brightblack] %Y-%m-%d |#[fg=white,bg=brightblack] %H:%M"
# Hostname
set -ga status-right "#[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore] #[fg=black,bg=blue,bold] #h "
#+--- Windows ---+
set -g window-status-format " #[fg=white,bg=brightblack] #I #[fg=white,bg=brightblack]#W #F "
set -g window-status-current-format " #[fg=black,bg=cyan] #I #[fg=black,bg=cyan]#W #F "
set -g window-status-separator ""