当前位置:网站首页>How do the TMUX color palette work?
How do the TMUX color palette work?
2022-06-25 01:59:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
pit 1:256 color support for vim background in tmux
Solve the problem of terminal color configuration and tmux Color configuration mismatch .
https://superuser.com/questions/399296/256-color-support-for-vim-background-in-tmux
reason
From the look of your .bashrc and .profile, the shells inside tmux are overriding the ‘default-terminal’ setting in your tmux conf. Something like this:
- tmux creates new shell with
TERM=screen-256color
- .bashrc/.profile run, set
TERM=xterm-256color
- vim runs, tries to use incorrect TERM for tmux
you can check this by running
echo $TERM
in a fresh tmux shell.
Tmux is relatively picky about having a terminal set correctly. If you can, set the term value in gnome-terminal’s configuration, not in your .bashrc. Failing that, surround those settings with a check for “screen” or “screen-256color” TERM, and don’t reset them in that case.
Tmux REALLY wants the terminal set to screen
or screen-256color
resolvent
This is what worked for me in #Ubuntu and #Mac:
# File: ~/.bashrc (Ubuntu), ~/.bash_profile (Mac)
# for VIM and TMUC
if [ "$TERM" = "xterm" ]; then
export TERM=xterm-256color
fi
alias tmux='tmux -2' # for 256color
alias tmux='tmux -u' # to get rid of unicode rendering problem
Reload settings:
$ source ~/.bashrc # Ubuntu $ source ~/.bash_profile # Mac
Set up .bashrc for Mac (as it is used by tmux)
# File: ~/.bashrc (Mac)
source ~/.bash_profile
Set up “default-terminal” option in ~/.tmux.conf.
# File: ~/.tmux.conf
set -g default-terminal "screen-256color" # Mac and Ubuntu
pit 2:Change background color of active or inactive pane in Tmux
Detailed explanation .tmux.conf How to set background color for configuration file . among ,fg It's the font color ,bg It's the background color .
https://newbedev.com/change-background-color-of-active-or-inactive-pane-in-tmux
It seems that tmux-2.1 (released 18 October 2015) now allows the colours of individual panes to be specified. From the changelog:
* 'select-pane' now understands '-P' to set window/pane background colours.
e.g. [from the manual] to change pane 1’s foreground (text) to blue and background to red use:
select-pane -t:.1 -P 'fg=blue,bg=red'
To mimic iTerm colour scheme:
To answer the original question, I use the following lines in my ~/.tmux.conf
for setting the background/foreground colours to mimic the behaviour in iTerm:
#set inactive/active window styles
set -g window-style 'fg=colour247,bg=colour236'
set -g window-active-style 'fg=colour250,bg=black'
# set the pane border colors
set -g pane-border-style 'fg=colour235,bg=colour238'
set -g pane-active-border-style 'fg=colour51,bg=colour236'
pit 3:Reloading tmux config
After writing the configuration file , Manual required source
Make it effective .
https://blog.sanctum.geek.nz/reloading-tmux-config/,Posted on 2012-03-19
If you have made changes to your tmux configuration file in the ~/.tmux.conf
file, it shouldn’t be necessary to start the server up again from scratch with kill-server
. Instead, you can prompt the current tmux session to reload the configuration with the source-file
command.
This can be done either from within tmux, by pressing Ctrl+B and then :
to bring up a command prompt, and typing:
:source-file ~/.tmux.conf
Or simply from a shell:
$ tmux source-file ~/.tmux.conf
This should apply your changes to the running tmux server without affecting the sessions or windows within them.
This entry was posted in Tmux and tagged configuration, reload, source, source-file, tmux.conf by Tom Ryder. Bookmark the permalink.
attach :tmux The configuration of the colour0~255 color table
You can create it with for i in {0..255}; do printf "\x1b[38;5;
The configuration file :
effect :
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/151786.html Link to the original text :https://javaforall.cn
边栏推荐
- Redis basic commands and types
- 02 common codes for Epicor secondary development
- ‘distutils‘ has no attribute ‘version
- 多模态数据也能进行MAE?伯克利&谷歌提出M3AE,在图像和文本数据上进行MAE!最优掩蔽率可达75%,显著高于BERT的15%
- Chinese address and English address
- IPC机制
- Google browser console F12 how to set the Chinese / English switching method, we must see the last!!!
- Some Modest Advice for Graduate Students - by Stephen C. Stearns, Ph.D.
- Abnova BSG monoclonal antibody description in Chinese and English
- 全排列II[存在相同元素去重 + 标准回溯]
猜你喜欢
PS5连接OPPO K9电视不支持2160P/4K
DDD概念复杂难懂,实际落地如何设计代码实现模型?
Abnova丨5-甲基胞嘧啶多克隆抗体中英文说明
Numerical scheme simulation of forward stochastic differential equations with Markov Switching
Application session coverage solutions with different ports on the same server
Abnova BSG monoclonal antibody description in Chinese and English
测试/开发程序员,30而立,你是否觉得迷茫?又当何去何从......
ICML2022 | 用神经控制微分方程建立反事实结果的连续时间模型
Constant current circuit composed of 2 NPN triodes
Integration of metersphere open source continuous testing platform and Alibaba cloud cloud cloud efficient Devops
随机推荐
MeterSphere開源持續測試平臺與阿裏雲雲效DevOps的集成
Do you know your ABC
Constant current circuit composed of 2 NPN triodes
tmux 如何自定义背景颜色 | How does the tmux color palette work?
SQL aggregate function handling null [easy to understand]
同一服务器两个端口不同的应用session覆盖解决方案
Pbcms adding cyclic digital labels
Baidu voice synthesizes voice files and displays them on the website
DDD概念复杂难懂,实际落地如何设计代码实现模型?
uni-app集成极光推送插件后真机调试提示“当前运行的基座不包含原生插件[JG-JPush]...”问题的解决办法
基本布局-QHBoxLayout类、QVBoxLayout类、QGridLayout类
Experiment 5 8254 timing / counter application experiment [microcomputer principle] [experiment]
Elastase instructions in Chinese and English
Stocking but not completely stocking (daily question 2 in spring)
Status quo analysis: how "one cloud and multi-core" can promote the rapid deployment of information innovation projects
Q1季度逆势增长的华为笔电,正引领PC进入“智慧办公”时代
CCNP的BGP部分笔记
DataEase模板市场正式发布
After integrating the aurora push plug-in in the uni app, the real machine debugging prompts "the currently running base does not contain the native plug-in [jg-jpush]..." Solutions to problems
Huawei laptop, which grew against the trend in Q1, is leading PC into the era of "smart office"