当前位置:网站首页>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 $TERMin 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 problemReload settings:
$ source ~/.bashrc # Ubuntu $ source ~/.bash_profile # Mac
Set up .bashrc for Mac (as it is used by tmux)
# File: ~/.bashrc (Mac)
source ~/.bash_profileSet up “default-terminal” option in ~/.tmux.conf.
# File: ~/.tmux.conf
set -g default-terminal "screen-256color" # Mac and Ubuntupit 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.confOr simply from a shell:
$ tmux source-file ~/.tmux.confThis 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
边栏推荐
- JS array object to object
- IPC机制
- 屡获大奖的界面控件开发包DevExpress v22.1官宣发布
- Multimodal emotion recognition_ Research on emotion recognition based on multimodal fusion
- 【LeetCode】11、盛最多水的容器
- RedisTemplate操作Redis,这一篇文章就够了(一)[通俗易懂]
- Q1季度逆势增长的华为笔电,正引领PC进入“智慧办公”时代
- Multi modal data can also be Mae? Berkeley & Google proposed m3ae to conduct Mae on image and text data! The optimal masking rate can reach 75%, significantly higher than 15% of Bert
- Cake review fatigue in the secondary market of innovative drugs: phase III clinical success and product approval
- write a number of lines to a new file in vim
猜你喜欢
![全排列II[存在相同元素去重 + 标准回溯]](/img/d3/93ddb49e580be60be4f056f141b782.png)
全排列II[存在相同元素去重 + 标准回溯]

内网学习笔记(5)

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

Dataease template market officially released

Multi modal data can also be Mae? Berkeley & Google proposed m3ae to conduct Mae on image and text data! The optimal masking rate can reach 75%, significantly higher than 15% of Bert

Day 04 - file IO

百度语音合成语音文件并在网站中展示

Hashcat 的使用

疫情防控,居家办公,网上授课之心得 | 社区征文
Cusdis - 轻量级、隐私优先的开源评论系统 | 倾城之链
随机推荐
测试/开发程序员,30而立,你是否觉得迷茫?又当何去何从......
Which account is safer and better for access letter
通达信哪个开户更安全,更好点
中金证券靠谱吗?开证券账户安全吗?
02-Epicor二次开发常用代码
Abnova BSG monoclonal antibody description in Chinese and English
Do you know your ABC
Redis persistence
Multimodal emotion recognition_ Research on emotion recognition based on multimodal fusion
DataEase模板市场正式发布
Unity C# 网络学习(六)——FTP(二)
Longest continuous sequence [diffusion method + space for time]
安超云:“一云多芯”支持国家信创政务云落地
[leetcode] 11. Container with the most water
Unity C # e-learning (VI) -- FTP (I)
IPC机制
ICML2022 | 用神经控制微分方程建立反事实结果的连续时间模型
Sumati GameFi生态纵览,神奇世界中的元素设计
Numerical scheme simulation of forward stochastic differential equations with Markov Switching
疫情防控,居家办公,网上授课之心得 | 社区征文