Giter Site home page Giter Site logo

The command bar is purple about tmux HOT 9 CLOSED

nordtheme avatar nordtheme commented on August 18, 2024
The command bar is purple

from tmux.

Comments (9)

arcticicestudio avatar arcticicestudio commented on August 18, 2024 9

Does your terminal support 24-bit True color and which tmux version are you running?
tmux supports 24-bit True color since version 2.2.

urxvt for example is know to parsing ANSI color sequences, but approximating them to 256 palette.

Please start tmux and run

tmux info | grep Tc

If the output is Tc: (flag) true your tmux supports true color, otherwise the output Tc: [missing] indicates that tmux has no True color support.

You can run this inside tmux to test the 24-bit colors:

awk 'BEGIN{
    s="/\\/\\/\\/\\/\\"; s=s s s s s s s s;
    for (colnum = 0; colnum<77; colnum++) {
        r = 255-(colnum*255/76);
        g = (colnum*510/76);
        b = (colnum*255/76);
        if (g>255) g = 510-g;
        printf "\033[48;2;%d;%d;%dm", r,g,b;
        printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
        printf "%s\033[0m", substr(s,colnum+1,1);
    }
    printf "\n";
}'

If the line looks "stepwise" tmux does not use 24-bit True color:

gh-15-scrot-no-24bit-true-color

Otherwise the line should have smooth transitions:

gh-15-scrot-24bit-true-color

The $TERM environment variable is important for tmux as also clarified in the official tmux FAQ. The variable must be initialized with a terminal that supports 256 colors (*-256color). More information about 24-bit color terminal support can be found in the awesome Arch Linux Wiki.

If your terminal supports True color you should make sure to set the terminal-overrides and default-terminal options in your ~/.tmux.conf:

set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"

This will reflect your actual $TERM outside of tmux and enables full compatibility.

Replace the xterm-256color with your desired terminal e.g. rxvt-unicode-256color. Make sure to include the important Tc terminfo extension flag!

If this doesn't fix the colors or causes other problems try to remove the default-terminal option so only the terminal-overrides values are applied.

from tmux.

AffanIndo avatar AffanIndo commented on August 18, 2024

screenshot from 2017-11-03 20-17-26
My split pane color became purple too even though on the .tmux.conf it is set to cyan. This only happened when I activate nord-tmux plugin

from tmux.

AffanIndo avatar AffanIndo commented on August 18, 2024

screenshot from 2017-11-04 16-01-24
Yeah, you're right. Previously I have Tmux 2.1 and no Tc.
But now I compiled 2.6 and it works.
But the Awk thingy become weird (and it blinking) even though my problem has fixed. Is this normal?

Also I did the set-option -ga terminal-overrides ",rxvt-unicode-256color:Tc"
but when I do echo $TERM it shows xterm-256color. Is that supposed to be like that?

from tmux.

arcticicestudio avatar arcticicestudio commented on August 18, 2024

Nice to see that it fixed your problem 😄

The weird output might be related to some implementation details regarding the escape codes (033, \e) or some awk version incompatibilities, but as long as this problem is only limited to the test code you can ignore it.

Have you tried to logout from the current session and check again after login? The $TERM env is loaded on login so the change can not be tested on-the-fly.

from tmux.

AffanIndo avatar AffanIndo commented on August 18, 2024

Yea, still weird. But my problem's fixed anyway :) thanks. Just the True color thingy

from tmux.

arcticicestudio avatar arcticicestudio commented on August 18, 2024

Maybe there's another compatibility problem with urxvt. You can check out the awesome Gist about Colours in terminal that covers almost all topics and includes a lot of troubleshooting documentation.

from tmux.

pannnnn avatar pannnnn commented on August 18, 2024

The command bar is yellow. And I have smooth transitions printed out by the command line you provided. And 'tmux info | grep Tc' is set correctly. The only thing that I think that could possibly cause this problem is that I am using Alacritty which is not in the installation list before installing Nord tmux. Could you please help me with this? That would be really appreciated

from tmux.

arcticicestudio avatar arcticicestudio commented on August 18, 2024

@pannnnn Can you please try to reproduce the problem with a clean Vim config that only contains the activation for the colorscheme but nothing else like plugins, settings or global variables?

from tmux.

arcticicestudio avatar arcticicestudio commented on August 18, 2024

@pannnnn Any updates on this? Have you been able to reproduce the problem with a clean config?
Also I must have overlooked that you wrote you're using Alacritty, but couldn't find a matching terminal color scheme in the list. There is Nord Alacritty and it is required to be installed when you're using Alacritty, otherwise the root cause of your problem is that the Nord colors are simply not available and instead the color your currently active theme is used which might use a different color ordering.

from tmux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.