cohesion
cohesion copied to clipboard
Color scheme: switching between dark/light themes not working in Flatpak without reopening Cohesion (fix inside)
TLDR: Upgrading Electron version will allow Cohesion to automatically adapt to system theme (dark/light) without having to reopen it.
How to reproduce:
- Be logged in, set "Settings"->"My Settings"->"Appearance" to "Use system setting"
- In system settings (KDE, Gnome, etc) switch from dark theme to light or vice versa.
Expected result: Cohesion switches with the system theme Reality: Cohesion remains unchanged. (If you close application completely and reopen it will indeed follow system settings)
How to fix: Upgrading the Electron version to 25.0.0 or higher
If I understand correctly, according to commits, current version of Electron in Cohesion is 21. Not sure how hard it is to upgrade Electron.
Relevant Links:
- Explanation of the issue a bit over my head, from Obsidian formus - they indeed have it fixed now
- Chromium bug report 1
- Fix confirmation
- Electron version 25.0.0 with chrome 144
Example Kde commands to switch themes from terminal: Dark
lookandfeeltool -platform offscreen --apply org.kde.breezedark.desktop
dbus-send --session --dest=org.kde.GtkConfig --type=method_call /GtkConfig org.kde.GtkConfig.setGtkTheme "string:Breeze-dark-gtk"
Light
lookandfeeltool -platform offscreen --apply org.kde.breeze.desktop
dbus-send --session --dest=org.kde.GtkConfig --type=method_call /GtkConfig org.kde.GtkConfig.setGtkTheme "string:Breeze"
https://github.com/brunofin/cohesion/assets/11075952/8c7adeb1-08bb-4898-8df9-c2d20be8f8e9