[Solved] Changing window focus makes kakoune permanently dark blue

Problem

Whenever I change focus to a different window, or change the size of the kakoune window, kakoune looks like it has a very dark blue filter infront of it and I can only get rid of it by restarting the instance.

Any ideas what could be causing this?

Is your terminal emulator Konsole, or some other terminal using the QTerminal library? Are you using a custom colour scheme?

Nope, zsh.
But yea, color scheme. It was caksoylar/kakoune-mysticaltutor, but just commented the line and restarted and it works. Should have thought of that.
Thanks.
Loving kakoune so far though!

Just to be clear, zsh is a shell that runs inside a terminal emulator. zsh is responsible for printing a prompt, the terminal emulator is responsible for choosing which font to display it in, what size to draw it, and what colour.

1 Like

Ah, yea, true. Then I’m using st, unless I got something else mixed up.

Comparing the xterm-256color terminal info database entry with st’s:

$ infocmp -1x xterm-256color st | grep ccc
	ccc: T:F.

…we can see that while xterm’s entry has the Can Change Colour (ccc) flag set to True, st has it set to False. If you run your terminal with $TERM set to xterm-256color, apps will assume they can change the palette of terminal colours, silently fail, and probably wind up using the colours that default to shades of dark blue.

You could:

  • Use a colour-scheme that only uses the basic 16 terminal colours, instead of using specific RGB colours
  • set $TERM to “st” instead of “xterm-256color”, which more accurately represents the terminal’s capabilities, but is less widely supported if you need to SSH to a remote host or something
    • this doesn’t actually make RGB colours work, but it should prevent them from breaking in such an unusable way
  • Use the latest Git versions of Kakoune, which uses terminals’ 24-bit colour support instead of trying to modify the 256-colour palette (this should be in the next official release of Kakoune, coming soon hopefully)
3 Likes