xpipe-io / xpipe

Your entire server infrastructure at your fingertips
https://xpipe.io
Apache License 2.0
3.45k stars 89 forks source link

Set light and dark themes separately and sync it with system #365

Closed maicol07 closed 1 week ago

maicol07 commented 1 month ago

Add a setting to sync the theme with the system and, when this is enabled, show separate settings for dark/light themes

crschnick commented 1 month ago

it should already follow the system theme automatically. So if you have dark mode enabled, XPipe should automatically set it to dark on first launch. It also updates the theme automatically when you change it in the system settings while XPipe is running

maicol07 commented 1 month ago

I confirm it works when XPipe is running. However this won't change the theme:

  1. Open XPipe
  2. Set system to light
  3. Close XPipe (also close tray)
  4. Set system to dark
  5. Reopen XPipe

XPipe Theme is still light

crschnick commented 1 month ago

Is that a use case that you have often? I was under the impression that the system theme wasn't changed for most people

maicol07 commented 1 month ago

I automatically let my system change it at sunrise (basically it changes it when the PC boots the first time in a day) and sunset. Most times when sunset comes XPipe is opened and the theme changes

crschnick commented 1 month ago

Alright I see, I can include that in the next release

crschnick commented 1 week ago

This is now implemented in XPipe 13

maicol07 commented 3 days ago

Hi,

it seems there is an issue with this feature: if you close XPipe with the system dark theme, restart the whole system, change the system theme to light and open XPipe the theme is still dark

crschnick commented 3 days ago

Hmm this should work now, at least it does for me in XPipe 13. Can you check the file <User Home>/.xpipe/cache/lastDarkTheme.cache, XPipe should write that file on exit with the dark theme state. If that state doesn't match up with the system state on next start, it should change the theme,

maicol07 commented 2 days ago

It worked with another restart and the file changes! I'll keep it monitored

crschnick commented 2 days ago

Is it possible that you may be restarted your system while XPipe was still running? I'm not sure whether it properly shuts down and writes the file when Windows closes running programs on shutdown

maicol07 commented 2 days ago

Yes, that's very likely