Staying active or "Where the heck am I typing?!"
Recently, someone posted a question on the issue queue for the colour scheme that I have been developing. Specifically they wondered why I was only setting the background colour in NeoVim when it was running in the GUI version. Why indeed?
One of the downsides to the immense power of running NeoVim inside of Tmux inside of kitty, especially on a relatively large screen, is that one tends to end up with quite a few splits and windows and at a glance one can often ask, "Where the heck am I typing?!"
Thankfully, both Tmux and NeoVim have the concept of active vs inactive windows which ends up looking like the following in NeoVim:
if exists('+winhighlight') hi ActiveWindow guibg=NONE | hi InactiveWindow guibg=#13131c set winhighlight=Normal:ActiveWindow,NormalNC:InactiveWindow endif
(here we are only setting the background when the window is considered inactive in NeoVim, when it is active it will fall through to Tmux)
...and in the Tmux configuration it looks like this:
set -g window-style "bg=#13131c" set -g window-active-style "bg=#04041a"
(note that Tmux doesn't call something explicitly active but more like it has the absence of "active"-ness!)
Of course, all these RGB hex values won't work correctly unless you have true colour working in all three which can be troublesome especially if you also want italics, bold and cursor shapes working! (I will keep that for another post)