Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Error] Get strange color background thing when integrate Cmder to Windows 10 terminal #2527

Closed
ghost opened this issue Apr 17, 2021 · 23 comments

Comments

@ghost
Copy link

ghost commented Apr 17, 2021

I use default settings when intergrate Cmder to Windows 10 Terminal. Both are latest version
Proof
[x]proof

@chrisant996
Copy link
Contributor

It looks as if a background image may have been configured, as in the background image section of the Windows Terminal documentation.

What happens if a long line of text is typed? Does it extend past the black rectangle into the dimmed image? Is the custom proportional spaced font also affecting the rendering?

@ghost
Copy link
Author

ghost commented Apr 17, 2021

Thanks for the reply. I changed every font i got ( even default windows it keeps getting the bug like that). Settings is default.
proof2 . My background is fill

@ghost
Copy link
Author

ghost commented Apr 17, 2021

If i print long text, it keep this Proof3

@chrisant996
Copy link
Contributor

Can you clarify what you're reporting as the issue?

  • That a background image is showing up?
  • Or that the black background of some lines of text is obscuring the background image?

If the latter, then it sounds like the same as issue #2516. The information there may be helpful to configure the Cmder prompt to avoid the black bars.

@ghost
Copy link
Author

ghost commented Apr 17, 2021

Hey there . The method with #2516 you mention is working. Thanks for your help. I will close this comment since fixed :D

@ghost ghost closed this as completed Apr 17, 2021
@daxgames
Copy link
Member

daxgames commented Apr 17, 2021

@buinguyenhoangtho did you download the new build and use the new configurable prompt to fix this or did you edit

local cmder_prompt = "\x1b[1;32;40m{cwd} {git}{hg}{svn} \n\x1b[1;39;40m{lamb} \x1b[0m"

@ghost
Copy link
Author

ghost commented Apr 17, 2021

@daxgames I'm download the latest and follow the comment :D.

@chrisant996
Copy link
Contributor

chrisant996 commented Apr 17, 2021

@daxgames I'm download the latest and follow the comment :D.

@buinguyenhoangtho Which comment? :)

@ghost
Copy link
Author

ghost commented Apr 17, 2021

@buinguyenhoangtho Which comment? :)

  • The comment about how to modify clink.lua? (Which will get overwritten next time you install an upgrade for Cmder.)

This one

function my_prompt_filter()
    cwd = clink.get_cwd()
    prompt = "\x1b[1;32;49m{cwd} {git}{hg}{svn} \n\x1b[2;37;49m{lamb} \x1b[0m"
    new_value = string.gsub(prompt, "{cwd}", cwd)
    clink.prompt.value = string.gsub(new_value, "{lamb}", "★")
end

clink.prompt.register_filter(my_prompt_filter, 1)

Where can i find the latest_pre-release btw? Can you show me the way?

@daxgames
Copy link
Member

@buinguyenhoangtho the new code includes a configurable prompt with a settings file in %cmder_root%/config you should be able to set all colors in that and not use a custom prompt filter at all.

@ghost
Copy link
Author

ghost commented Apr 17, 2021

@buinguyenhoangtho the new code includes a configurable prompt with a settings file in %cmder_root%/config you should be able to set all colors in that and not use a custom prompt filter at all.

oh ok i get it.

@daxgames
Copy link
Member

@daxgames
Copy link
Member

Please let me know if it works for you.

@ghost
Copy link
Author

ghost commented Apr 17, 2021

Ok let me try. I'm usually download it from main website so it old build i afraid?
Old?

@ghost
Copy link
Author

ghost commented Apr 17, 2021

@daxgames This is prebuild-release and still get the black board
still

@chrisant996
Copy link
Contributor

@daxgames This is prebuild-release and still get the black board

Did you configure it to use 49? Try that.

@daxgames
Copy link
Member

@buinguyenhoangtho there should be a %cmder_root%\config\cmder_prompt_config.lua file you can edit colors in and restart Cmder. The new build does not xhange default settings, it just allows the user to configure them to work with alternate terminals

@ghost
Copy link
Author

ghost commented Apr 17, 2021

@buinguyenhoangtho there should be a %cmder_root%\config\cmder_prompt_config.lua file you can edit colors in and restart Cmder. The new build does not xhange default settings, it just allows the user to configure them to work with alternate terminals

so this the result i guess
result

@daxgames
Copy link
Member

daxgames commented Apr 18, 2021

I am suprised the entire prompt is green but at least there are no black bars.

@ghost
Copy link
Author

ghost commented Apr 18, 2021

I am suprised the entire prompt is green but at least there are no black bars.

yes me too. But one more thing, i can't find anyway to make my VScode terminal after intergrated with Cmder support Emoji. Although Vscode is support Emoji

@ghost
Copy link
Author

ghost commented Apr 18, 2021

Emoji

@chrisant996
Copy link
Contributor

I am suprised the entire prompt is green but at least there are no black bars.

The lamb_color in the screen shot has 30;32m.

32 = green.

It's green because that's what it's been explicitly set to.

@hectormz
Copy link

hectormz commented Jan 18, 2022

Changing from:

uah_color = "\x1b[1;33;40m" -- Green = uah = [user]@[hostname]
cwd_color = "\x1b[1;32;40m" -- Yellow cwd = Current Working Directory
lamb_color = "\x1b[1;30;40m" -- Light Grey = Lambda Color
clean_color = "\x1b[1;37;40m"

to

uah_color = "\x1b[1;33;49m" -- Green = uah = [user]@[hostname]
cwd_color = "\x1b[1;32;49m" -- Yellow cwd = Current Working Directory
lamb_color = "\x1b[1;30;49m" -- Light Grey = Lambda Color
clean_color = "\x1b[1;37;49m"

got rid of black band and prompt background follows Windows terminal appearance

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants