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

Terminal colors do not persist after switching from tiling to floating in an editor #3064

Closed
Cubxity opened this issue Dec 3, 2019 · 13 comments

Comments

@Cubxity
Copy link

Cubxity commented Dec 3, 2019

Terminal colors do not persist after switching from tiling to floating in an editor.

System

OS: Arch Linux
Version: alacritty 0.4.0
Linux/BSD: X11, i3-gaps, compositor: picom

Steps to reproduce:

  • printf "\e]4;1;rgb:ff/00/ff"
  • run nano
  • resize the window
  • exit nano (discard changes)
@chrisduerr
Copy link
Member

Can you reproduce this issue in a different terminal emulator?

It sounds like your editor might just be resetting the terminal colors, though I'm not 100% sure I understand the exact steps you're taking.

@Cubxity
Copy link
Author

Cubxity commented Dec 3, 2019

Does not happen in Konsole

@Cubxity
Copy link
Author

Cubxity commented Dec 3, 2019

Peek 2019-12-03 18-25

Here's a gif demonstrating

@chrisduerr
Copy link
Member

If the change in tiling mode and nano required? I think simplifying the repro for this would likely be very helpful.

It seems strange to me that resizing would have anything to do with it.

@chrisduerr
Copy link
Member

Also it might be worth it to test with just printf "\e]4;1;rgb:ff/00/ff", instead of running the full pywal script. That should probably help make this repro even less complex.

@Cubxity
Copy link
Author

Cubxity commented Dec 3, 2019

That works too, edited the repro

@chrisduerr
Copy link
Member

chrisduerr commented Dec 3, 2019

Looks like an issue with nano, if you run TERM=xterm-termite nano for example this will not happen in Alacritty.

So it seems like nano is just telling Alacritty to reset its colors and Alacritty obviously complies. So this would have to be fixed in nano I'd assume.

@kchibisov
Copy link
Member

kchibisov commented Dec 3, 2019

I wonder if you can repro with TERM=alacritty in konsole though.

@chrisduerr
Copy link
Member

I was able to reproduce with TERM=alacritty in URxvt, so I'd assume so.

Testing Konsole is tough because it's so massive, but the behavior was consistent between Termite, Alacritty and URxvt. I'd assume that's the same for Konsole.

@kchibisov
Copy link
Member

I was able to reproduce with TERM=alacritty in URxvt, so I'd assume so.

Testing Konsole is tough because it's so massive, but the behavior was consistent between Termite, Alacritty and URxvt. I'd assume that's the same for Konsole.

@chrisduerr Yeah, it's enough,I guess.

Just OP mentioned Konsole, so I mentioned it.

@Cubxity
Copy link
Author

Cubxity commented Dec 4, 2019

Would it be possible for you guys to add something in config like script/command to run after resize?

@nixpulvis
Copy link
Contributor

@Cubxity we've generally avoided too much user scripting so far, however I can see the desire for some hooks to added. For example #1528 is talking about a possible bell_command. However, I'd want to be careful to avoid adding an <event>_command for every event we process though.

This specific issue does seem better fixed by nano itself, since I can't reproduce it at all with vim. I could however get nano to stop doing this by running with env TERM=ansi nano, so depending on you use case you may be happy with that.

@chrisduerr
Copy link
Member

We will never support running scripts on resize, that just doesn't sound like a great idea at all.

But yeah, generally I'd say if you're really frequently running into this, you probably might want to look into some nicer terminal editors anyways.

If it's just about the occasional accidental nano opening, a good idea would be to just alias nano to run under a different terminfo, that should solve the issue and is basically what other terminal emulators do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants