Skip to content

Conversation

@NandeMD
Copy link

@NandeMD NandeMD commented Jul 25, 2025

This PR adds two things:

  • On the first startup, (if there is no $HOME/.config/Psst/config.json file), app tries to detect the system theme, falls back to Theme::Light on error or unspecified theme.
  • A new button on the Preferences -> General Tab -> Theme. When pressed, it tries to detect the system theme, falls back to Theme::Light on error or unspecified theme:
Screencast_20250725_143112.webm

@jacksongoode
Copy link
Collaborator

jacksongoode commented Jul 26, 2025

Super cool thank you! Did you see #162 and #160 and #150 ? If so that's great, I haven't yet looked at the code but I remember there was an issue where the subscription to os changes in light/dark was removed. rust-dark-light/dark-light#68

We can still have a third mode here rather than the auto detect button. I would add "auto" - and then we can do two things.

  1. When the user clicks auto, we determine the theme and apply
  2. When the application starts, we do one more check to make sure the theme hasn't changed?

@NandeMD
Copy link
Author

NandeMD commented Jul 27, 2025

We can still have a third mode here rather than the auto detect button. I would add "auto" - and then we can do two things.

1. When the user clicks auto, we determine the theme and apply

2. When the application starts, we do one more check to make sure the theme hasn't changed?

Thanks for the advice! I will change the implementation to this when I'm free in a few days.

@NandeMD
Copy link
Author

NandeMD commented Jul 30, 2025

Hey @jacksongoode, sorry for the late update.

  • Added a new System variant to the Theme enum and set it as the default theme.
  • Updated the RadioGroup in the preferences UI to include the "System" theme option.
  • If the theme is System, auto-detect system color theme on application startup.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants