Now that all my hosts are running new enough userlands to support the tmux-256color terminfo entry I can use it everywhere. Notably this enables italics to work inside tmux. Also update comment about the tmux-specific terminfo extensions for true color. I need to keep using "Tc" until all my hosts have tmux 3.2+. See: https://jdhao.github.io/2018/10/19/tmux_nvim_true_color/ See: https://github.com/tmux/tmux/wiki/FAQ#i-dont-see-italics-or-italics-and-reverse-are-the-wrong-way-round
144 lines
3.3 KiB
Bash
144 lines
3.3 KiB
Bash
unbind C-b
|
|
set-option -g prefix ^A
|
|
bind a send-prefix
|
|
|
|
# Bind appropriate commands similar to screen.
|
|
# lockscreen ^X x
|
|
unbind ^X
|
|
bind ^X lock-server
|
|
unbind x
|
|
bind x lock-server
|
|
|
|
# screen ^C c
|
|
unbind ^C
|
|
bind ^C new-window
|
|
unbind c
|
|
bind c new-window
|
|
|
|
# detach ^D d
|
|
unbind ^D
|
|
bind ^D detach
|
|
|
|
# displays *
|
|
unbind *
|
|
bind * list-clients
|
|
|
|
# next ^@ ^N sp n
|
|
unbind ^@
|
|
bind ^@ next-window
|
|
unbind ^N
|
|
bind ^N next-window
|
|
unbind " "
|
|
bind " " next-window
|
|
unbind n
|
|
bind n next-window
|
|
|
|
# title A
|
|
unbind A
|
|
bind A command-prompt "rename-window %%"
|
|
|
|
# other ^A
|
|
unbind ^A
|
|
bind ^A last-window
|
|
|
|
# prev ^H ^P p ^?
|
|
unbind ^H
|
|
bind ^H previous-window
|
|
unbind ^P
|
|
bind ^P previous-window
|
|
unbind p
|
|
bind p previous-window
|
|
unbind BSpace
|
|
bind BSpace previous-window
|
|
|
|
# windows ^W w
|
|
unbind ^W
|
|
bind ^W list-windows
|
|
unbind w
|
|
bind w list-windows
|
|
|
|
# kill K k
|
|
unbind K
|
|
bind K confirm-before "kill-window"
|
|
unbind k
|
|
bind k confirm-before "kill-window"
|
|
|
|
# redisplay ^L l
|
|
unbind ^L
|
|
bind ^L refresh-client
|
|
unbind l
|
|
bind l refresh-client
|
|
|
|
# " windowlist -b
|
|
unbind '"'
|
|
bind '"' choose-window
|
|
|
|
# use Escape for entering copy mode, like screen
|
|
bind Escape copy-mode
|
|
|
|
# less time between commands in a command sequence
|
|
set -s escape-time 0
|
|
|
|
# use vi-style key bindings
|
|
set-option -g mode-keys vi
|
|
|
|
# start numbering windows a 1
|
|
set -g base-index 1
|
|
|
|
# Rather than constraining window size to the maximum size of any client
|
|
# connected to the *session*, constrain window size to the maximum size
|
|
# of any client connected to *that window*. Much more reasonable.
|
|
set-window-option -g aggressive-resize on
|
|
|
|
# the visual bell causes a micro delay when typing. Tab completion triggers
|
|
# the bell and typing halts for a second and it's really annoying.
|
|
set-option -g visual-bell off
|
|
|
|
# status bar
|
|
set-option -g status-justify left
|
|
set-option -g status-left ''
|
|
set-option -g status-right '#[fg=colour47]#H #[fg=red]#(cut -d " " -f 1-3 /proc/loadavg) #[fg=colour227]%Y-%m-%d %H:%M#[default]'
|
|
|
|
# scrollback buffer
|
|
set-option -g history-limit 4096
|
|
|
|
# 2022-11-26: According to the tmux FAQ, inside tmux TERM must be "screen",
|
|
# "tmux" or similar (such as "tmux-256color"). As of CentOS Stream 8, now
|
|
# all my systems support this (check with `infocmp tmux-256color`).
|
|
#
|
|
# See: https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-a-256-colour-terminal
|
|
set-option -g default-terminal "tmux-256color"
|
|
|
|
# 2022-11-26: Tell Tmux that the outside terminal supports true color. I
|
|
# need to use the tmux-specific extension "Tc" for now until all my hosts
|
|
# are on tmux 3.2+.
|
|
#
|
|
# See: https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-rgb-colour
|
|
# See: https://jdhao.github.io/2018/10/19/tmux_nvim_true_color/
|
|
set -as terminal-overrides ",*-256color*:Tc"
|
|
|
|
#### COLOUR (Solarized dark)
|
|
|
|
# default statusbar colors
|
|
set-option -g status-style "bg=black fg=yellow default"
|
|
|
|
# default window title colors
|
|
set-window-option -g window-status-style "fg=brightblue bg=default"
|
|
|
|
# active window title colors
|
|
set-window-option -g window-status-current-style "fg=brightred bg=default"
|
|
|
|
# pane border
|
|
set-option -g pane-border-style "fg=black"
|
|
set-option -g pane-active-border-style "fg=brightgreen"
|
|
|
|
# message text
|
|
set-option -g message-style "bg=black fg=brightred"
|
|
|
|
# pane number display
|
|
set-option -g display-panes-active-colour blue #blue
|
|
set-option -g display-panes-colour brightred #orange
|
|
|
|
# clock
|
|
set-window-option -g clock-mode-colour green #green
|