Tmux

黑色背景底線上的 Tmux 黑色文本

  • April 21, 2021

我正在失去理智。當我進入 tmux 的“命令模式”(通常使用 獲得Crtl-B-:?我嘗試使用 的設置window-status-bell-stylemessage-command-style然後mode-style重新Crtl-Q-r載入配置文件但無濟於事。樣式更改僅適用於之後儘管重新載入了配置文件,tmux 伺服器會重新啟動或打開一個新視窗?

unbind C-b
#unbind -n C-b # this will reset C-b to default (back one character)
set -g prefix C-q
# bind-key C-q last-window
bind-key q send-prefix

set -sg escape-time 1

# set -g default-terminal "xterm-256color"
set-option -g default-terminal "screen-256color"

set -g history-limit 10000

set -g terminal-overrides 'xterm*:smcup@:rmcup@'


# start first window at 1 instead of 0
set -g base-index 1

# reload config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."

# auto window rename
set-window-option -g automatic-rename

#  modes
setw -g clock-mode-colour colour5
setw -g mode-style 'fg=colour8 bg=colour9 bold'

# panes
set -g pane-border-style 'fg=colour19 bg=colour0'
set -g pane-active-border-style 'bg=colour0 fg=colour9'

# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'bg=colour18 fg=colour137 dim'
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour19] %d/%m #[fg=colour233,bg=colour8] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20

setw -g window-status-current-style 'fg=colour1 bg=colour19 bold'
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '

setw -g window-status-style 'fg=colour9 bg=colour18'
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '

setw -g window-status-bell-style 'fg=colour=19 bg=colour9 bold'

# messages
set -g message-style 'fg=colour232 bg=colour16 bold'


# Activity monitoring
setw -g monitor-activity off
set -g visual-activity off


# 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.
setw -g aggressive-resize on


# Toggle mouse on with ^B m
bind m \
 set -g mode-mouse on \;\
 set -g mouse-resize-pane on \;\
 set -g mouse-select-pane on \;\
 set -g mouse-select-window on \;\
 display 'Mouse: ON'

# Toggle mouse off with ^B M
bind M \
 set -g mode-mouse off \;\
 set -g mouse-resize-pane off \;\
 set -g mouse-select-pane off \;\
 set -g mouse-select-window off \;\
 display 'Mouse: OFF'



# loud or quiet?
# set-option -g visual-activity off
# set-option -g visual-bell off
# set-option -g visual-content off
# set-option -g visual-silence off
# set-window-option -g monitor-activity off
# set-window-option -g monitor-content on
# set-option -g bell-action none

這個問題可能與tmux bottom bar color change重複,但那裡的答案更多地關注顏色選擇,然後解釋不同的設置。

就是這一行:

set -g message-style 'fg=colour232 bg=colour16 bold'

232(大部分)是黑色,16 也是黑色。

 message-style style
        Set status line message style.  This is used for messages and 
        for the command prompt.  For how to specify style, see the 
        STYLES section.

嘗試:

set -g message-style 'fg=white bg=black bold'

引用自:https://unix.stackexchange.com/questions/645810