dotfiles/.config/tmux/tmux.conf

100 lines
2.3 KiB
Plaintext
Raw Normal View History

2019-03-19 21:18:01 +01:00
# Start a session if none exists
new-session -s main
# Start htop and split window
2021-12-20 17:12:22 +01:00
set-hook -t main session-created 'send-keys -t main:0 "sudo htop" C-m; split-window'
2016-04-16 16:31:54 +02:00
# 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
2024-06-20 09:19:24 +02:00
# split panes using # and -
bind "#" split-window -h
bind "-" split-window -v
2016-04-16 16:31:54 +02:00
unbind '"'
unbind %
2020-10-11 19:59:56 +02:00
# reload config file
bind r source-file $XDG_CONFIG_HOME/tmux/tmux.conf
2016-04-16 16:31:54 +02:00
# 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
2016-04-17 01:15:16 +02:00
# start windows and panes at 1, not 0,
set -g base-index 1
set -g pane-base-index 1
2019-03-19 21:18:01 +01:00
# Enable mouse mode
set -g mouse on
2018-12-28 23:51:01 +01:00
2020-07-02 12:55:35 +02:00
#+---------+
#+ Options +
#+---------+
set -g status-interval 1
set -g status on
2021-01-21 00:05:55 +01:00
set -g aggressive-resize on
2020-07-02 12:55:35 +02:00
#+--------+
#+ Status +
#+--------+
#+--- Layout ---+
set -g status-justify left
#+--- Colors ---+
set -g status-bg black
set -g status-fg white
#+-------+
#+ Panes +
#+-------+
2024-06-20 09:19:24 +02:00
set -g pane-border-style bg=black,fg=brightblack
set -g pane-active-border-style bg=black,fg=magenta
2020-07-02 12:55:35 +02:00
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
2016-04-16 16:31:54 +02:00
######################
### DESIGN CHANGES ###
######################
## Status bar design
# status line
set -g status-justify left
2024-06-20 09:19:24 +02:00
set -g status-interval 1
2016-04-16 16:31:54 +02:00
set -g default-terminal "screen-256color"
2020-07-02 12:55:35 +02:00
#+--- Bars ---+
2024-06-20 09:19:24 +02:00
set -g status-left ''
## Indicate if prefix has been pressed
2024-06-20 23:15:09 +02:00
set -ga status-left '#[bg=#white]#[fg=#brightblack]#{?client_prefix,#[fg=red] ◯ , ◯ }'
2024-06-20 09:19:24 +02:00
## Session name
2024-06-20 23:15:09 +02:00
set -ga status-left "#S"
2024-06-20 09:19:24 +02:00
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 "
2016-04-16 16:31:54 +02:00
2020-07-02 12:55:35 +02:00
#+--- Windows ---+
2020-07-02 17:51:00 +02:00
set -g window-status-format " #[fg=white,bg=brightblack] #I #[fg=white,bg=brightblack]#W #F "
2024-06-20 09:19:24 +02:00
set -g window-status-current-format " #[fg=black,bg=cyan] #I #[fg=black,bg=cyan]#W #F "
2024-06-20 23:15:09 +02:00
set -g window-status-separator ""