randy3k / Terminus

Bring a real terminal to Sublime Text
https://packagecontrol.io/packages/Terminus
MIT License
1.39k stars 81 forks source link

can't show the unicode symbol with color #191

Closed jaredyam closed 4 years ago

jaredyam commented 4 years ago

I am using a colorized Unicode symbol as my terminal indicator, which shows the feedback about the last command. In the terminus shell, the symbol shows ugly with an unexpected white background. Here are the screenshots:

Screen Shot 2020-02-18 at 10 08 42 AM Screen Shot 2020-02-18 at 10 09 05 AM

Is this an issue same with #75 ? Can I improve the terminus look without rewriting my terminal's config? [I have tried 256color=true and vscode terminal shows it well.]

randy3k commented 4 years ago

What unicode is that char? I don't have any issues here

Screen Shot 2020-02-17 at 8 22 38 PM
jaredyam commented 4 years ago

@randy3k \u203d โ€ฝ

randy3k commented 4 years ago

By the way, did you change "unix_term" to "xterm-256color".

jaredyam commented 4 years ago

Here is my setting:

Screen Shot 2020-02-18 at 1 25 07 PM

and I have tried the code you refers It seems work for me.

Screen Shot 2020-02-18 at 1 32 58 PM

Does it my zsh theme's problem? I am using the spaceship zsh theme, the configs for my indicator using the below codes in zsh:

ZSH_THEME="spaceship"
SPACESHIP_CHAR_SYMBOL=(" \u003f ")
SPACESHIP_CHAR_COLOR_SUCCESS=("#fcd947")
SPACESHIP_CHAR_COLOR_FAILURE=("#f32525")

Why it not works in terminus, can I fix it?

randy3k commented 4 years ago

Could you turn on the debug mode and report what you see in the console?

jaredyam commented 4 years ago

Are these infomation useful?

DEBUG:Terminus:mode: [7, 25], cursor: 0.0
receieved: 
~ 
๐ŸŒˆ๐Ÿ’›๐Ÿงก๐Ÿ’œ โ€ฝ [?1h=[?2004h
DEBUG:Terminus:receieved: 
~ 
๐ŸŒˆ๐Ÿ’›๐Ÿงก๐Ÿ’œ โ€ฝ [?1h=[?2004h
add 0 line(s) to scroll back history
randy3k commented 4 years ago

38;2;252;217;71 is a 24 bit color not 8bit which is not supported in Terminus. I think it is related to color in SPACESHIP_CHAR_COLOR_SUCCESS and SPACESHIP_CHAR_COLOR_FAILURE.

jaredyam commented 4 years ago

Oh, I have changed the color into 8-bit encode which has a very simple encoding, terminus works for now! Thank for your help!

jaredyam commented 4 years ago

Can more colors be supported in the future? Since I tried some simple colors for testing, it seems that only some very simple colors supported for now (red, yellow, blue...) not 8 bit.

randy3k commented 4 years ago

Terminus does support all 8bit colors. Did you find any 8-bit color not working?

In theory, 24bit color could be supported, BUT it will decrease the performance by a lot as we are relying on a hack to display different colors in Sublime Text.

jaredyam commented 4 years ago

You are true. Actually these colors can be enough, thank for your help again.

jaredyam commented 4 years ago

An unessential report: 256colour This 256 colormap not all works for me. A brave assumption is that just below colors can show successively::

Screen Shot 2020-02-18 at 3 50 23 PM

or

        // "00": "#000000",  // black
        // "01": "#cd0000",  // red
        // "02": "#00cd00",  // green
        // "03": "#cdcd00",  // brown
        // "04": "#0000ee",  // blue
        // "05": "#cd00cd",  // magenta
        // "06": "#00cdcd",  // cyan
        // "07": "#e5e5e5",  // white
        // "08": "#7f7f7f",  // light_black
        // "09": "#ff0000",  // light_red
        // "10": "#00ff00",  // light_green
        // "11": "#ffff00",  // light_brown
        // "12": "#5c5cff",  // light_blue
        // "13": "#ff00ff",  // light_magenta
        // "14": "#00ffff",  // light_cyan
        // "15": "#ffffff"   // light_white

in the terminus setting.

randy3k commented 4 years ago

I am not sure what you meant. What is not working for you?

jaredyam commented 4 years ago

I made a mistake before, the issue has been fixed. The 8-bit color works well.