2019-03-19 21:18:01 +01:00
|
|
|
# Start a session if none exists
|
2019-03-19 21:46:22 +01:00
|
|
|
new-session -s main
|
2020-07-03 08:43:39 +02:00
|
|
|
# Start htop and split window
|
|
|
|
set-hook -t main session-created 'send-keys -t main:0 "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
|
|
|
|
|
2021-01-19 23:35:17 +01:00
|
|
|
# Use C-b to send prefix twice so it acts on nested session
|
|
|
|
bind-key -n C-b send-prefix
|
|
|
|
|
2016-04-16 16:31:54 +02:00
|
|
|
# split panes using | and -
|
|
|
|
bind | split-window -h
|
|
|
|
bind - split-window -v
|
|
|
|
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
|
2019-03-19 23:02:21 +01:00
|
|
|
set -g mouse on
|
2018-12-28 23:51:01 +01:00
|
|
|
|
2020-07-02 12:55:35 +02:00
|
|
|
#+----------------+
|
|
|
|
#+ Plugin Support +
|
|
|
|
#+----------------+
|
|
|
|
#+--- tmux-prefix-highlight ---+
|
|
|
|
set -g @prefix_highlight_fg black
|
|
|
|
set -g @prefix_highlight_bg brightcyan
|
|
|
|
|
|
|
|
#+---------+
|
|
|
|
#+ 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 +
|
|
|
|
#+-------+
|
|
|
|
set -g pane-border-style bg=black,fg=black
|
|
|
|
set -g pane-active-border-style bg=black,fg=brightblack
|
|
|
|
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
|
|
|
|
set -g status-interval 2
|
|
|
|
|
|
|
|
set -g default-terminal "screen-256color"
|
|
|
|
|
2021-01-21 00:05:55 +01:00
|
|
|
# Add true color & italics support with alacritty terminal
|
|
|
|
if-shell 'type "alacritty" >/dev/null' \
|
|
|
|
'set -g default-terminal "alacritty"'
|
|
|
|
|
2020-07-02 12:55:35 +02:00
|
|
|
#+--- Bars ---+
|
2020-07-02 17:51:00 +02:00
|
|
|
set -g status-left "#[fg=black,bg=blue,bold] #S "
|
2020-07-02 22:40:16 +02:00
|
|
|
set -g status-right "#{prefix_highlight}#[fg=white,bg=brightblack] %Y-%m-%d #[fg=white,bg=brightblack,nobold,noitalics,nounderscore]|#[fg=white,bg=brightblack] %H:%M#[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore] #[fg=black,bg=cyan,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 "
|
|
|
|
set -g window-status-current-format " #[fg=black,bg=cyan] #I#[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#W #F "
|
2020-07-02 12:55:35 +02:00
|
|
|
set -g window-status-separator ""
|