Skip to main content
mroche
October 17, 2023
Question

[UI] Automatic theme switching

  • October 17, 2023
  • 3 replies
  • 192 views

It's been discussed a few times (https://1password.community/discussion/128215/dark-style-preference, https://1password.community/discussion/139290/dark-mode-doesnt-work-for-flatpak), but matching the system theme should be technologically possible now without hacks. Other Electron based applications have been able to automatically detect and change between light and dark themes for a bit now. This may be due to finally using newer versions of Electron, which I scrounged up via the following search:

bash
strings <path-to-app> | grep -e 'Electron/' -e 'Electron v2'

Results

App Stack ATS
1Password Chrome/114.0.5735.289 Electron/25.8.1 ⛔*
Slack Chrome/116.0.5845.190 Electron/26.2.4 ⚠️**
Element Desktop Chrome/116.0.5845.190 Electron/26.2.4

* 1Password provides an option for matching the system but it does not work.
** Slack does not expose an option for matching the system theme, but it shares the same base as Element Desktop which does function just fine.


I'm not sure if it would help, but https://releases.electronjs.org/release/v25.8.4 released a few weeks ago and includes an enhancement to detect system theme preference via the XDG settings portal.

It would be really great to finally have this functional for those of us who prefer to switch between themes during day-to-night and night-to-day transitions 😄


1Password Version: 8.10.16
Extension Version: Not Provided
OS Version: Fedora 38
Browser: Not Provided

3 replies

AliH1P
1Password Employee
October 17, 2023

Hey @mroche, thanks for reaching out.

I've added you to the internal issue we have filed for this. I've also passed your findings along to our developers in case this helps at all.

It would be really great to finally have this functional for those of us who prefer to switch between themes during day-to-night and night-to-day transitions

Thanks for sharing your use case here, I can certainly see how matching system themes would be important in this instance.

Let me know if you have any questions!

Ali

ref: dev/core/core#22281

mroche
mrocheAuthor
February 19, 2024

Following up on this a quarter later, thank you very much for getting this sorted in the latest versions of 1Password for Linux! Matching the system theme mostly works like a charm.*

* There is a caveat that 1Password will not set the proper initial color scheme if the system scheme has changed from light to dark in the time period between the application quitting and starting up.

  1. Set system scheme to light variant.
  2. Launch 1Password and ensure its presenting in light mode.
  3. Reboot system or completely quit 1Password.
  4. Change system scheme to light dark variant.
  5. Launch 1Password.

In this scenario, the title bar will correctly have the dark theme, but the actual application surface will be rendering with the light scheme. Switching the system state to light then back to dark brings 1Password back into the correct state.


1Password: 8.10.24
OS Version: Fedora 39

March 4, 2024

Also experiencing this, but at least it respects the theme during runtime now.