nixos-config/extra/tmux.conf
Christoph Heiss 1893a08e4e
extra: tmux: fix truecolor mode
Missed the `*`, as well as using `Tc` seems to result in better
compatibility and is even needed for some applications like neomutt.

Fixes: cc0f777 ("extra: tmux: enable proper RGB/truecolor mode")
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2024-04-22 11:40:01 +02:00

85 lines
2.3 KiB
Plaintext

# run `tmux list-keys` to get all current key mappings
unbind-key '"'
unbind-key %
# Status bar colors
set-option -g status-style "bg=white,fg=black"
# Default window title colors
set-window-option -g window-status-style "fg=colour244" # base0
# Active window title colors
set-window-option -g window-status-current-style "fg=colour166,bright" # orange
# Pane border
set-option -g pane-border-style "fg=colour250" # light grey
set-option -g pane-active-border-style "fg=colour238" # dark grey
# Message color
set-option -g message-style "bg=white,fg=colour166" # white,orange
# Pane number display
set-option -g display-panes-active-colour colour33 # blue
set-option -g display-panes-colour colour166 # orange
set-option -g status-interval 5
set-option -g status-justify centre # center align window list
set-option -g status-left-length 140
set-option -g status-right-length 140
# Activity monitoring
set-window-option -g monitor-activity on
set-option -g visual-activity off
# Horizontal and vertical split
bind-key b split-window -h -c "#{pane_current_path}"
bind-key v split-window -c "#{pane_current_path}"
# New window
bind-key c new-window -c "#{pane_current_path}"
# Window traversal
bind-key C-h previous-window
bind-key C-t next-window
# Pane traversal
bind-key d select-pane -L
bind-key h select-pane -D
bind-key t select-pane -U
bind-key n select-pane -R
# Horizontal pane resize
bind-key s resize-pane -R 5
bind-key m resize-pane -L 5
# Reload config
bind-key C-r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded..."
# Auto window rename
set-window-option -g automatic-rename
# Vi copypaste mode
set-option -g mode-keys vi
# selection & copy
bind-key -Tcopy-mode-vi v send -X begin-selection
bind-key -Tcopy-mode-vi y send -X copy-selection-and-cancel
# movement
bind-key -Tcopy-mode-vi d send -X cursor-left
bind-key -Tcopy-mode-vi h send -X cursor-down
bind-key -Tcopy-mode-vi t send -X cursor-up
bind-key -Tcopy-mode-vi n send -X cursor-right
# scrolling
bind-key -Tcopy-mode-vi C-e send -X halfpage-down
bind-key -Tcopy-mode-vi C-u send -X halfpage-up
# search
bind-key -Tcopy-mode-vi l send -X search-again
bind-key -Tcopy-mode-vi L send -X search-reverse
# Detach client
bind-key C-d detach-client
set-option -g focus-events on
set-option -sa terminal-features ',foot*:Tc'