glow
glow copied to clipboard
Switching system themes in GNOME does not update color scheme
When switching between a light and dark theme on GNOME (Fedora 33), the Glow colour scheme except from the background does not update. This issue has been around since v1.0.0, (love using Glow!) always thought it was a terminal bug however I recently noticed that this bug is not present in another TUI (dijo). The colours persist even when navigating between files in Glow.
Screenshots to clarify:
Light theme

Dark theme, switched while glow is open

Dark theme

Reproduce
- Use light theme:
/usr/bin/gsettings set org.gnome.desktop.interface gtk-theme Adwaita. - Open
glow. - Use dark theme:
/usr/bin/gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark. - See colours in Glow not updating.
Are you talking about switching the theme while glow is running? The theme is only checked on startup (at least currently).
@muesli Yes exactly. It might seem like an edge case however I believe this is going to be more common once more distros start using automatic light/dark theme settings like Elementary OS is doing.
Quick update:
While not impossible, this might be really tricky to support. We'd have to periodically query the terminal for its current color settings, which - depending on the terminal you're using - can be a time-intensive query. Mind you, we're talking milliseconds, but it's probably not something you'd want to query once per second. I have to do some more tests and benchmarks with various terminals.
I get that, I hope that somewhere down the line terminals would signal a desktop color scheme change... :crossed_fingers:
Coincidentally I've recently looked at supporting color scheme changes in a cli app daemon and working on adding that by listening to the freedesktop portal color-scheme value over d-bus. Maybe that's also an option here?