Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Automatically switch theme of Mozilla Firefox #13

Open
prajjwaldimri opened this issue Mar 27, 2019 · 4 comments
Open

Suggestion: Automatically switch theme of Mozilla Firefox #13

prajjwaldimri opened this issue Mar 27, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@prajjwaldimri
Copy link

Firefox stores profile data in /home//.mozilla/firefox/profiles.ini
Or Whatever directory is listed here: about:profiles

Data of profiles.ini looks like this

[General]
StartWithLastProfile=1

[Profile0]
Name=dev-edition-default
IsRelative=1
Path=0xo36fmu.dev-edition-default

[Profile1]
Name=default
IsRelative=1
Path=xngzkevy.default
Default=1

I don't yet know if this has anything to do with light and dark themes but I am looking into this.

Thanks.

@prajjwaldimri
Copy link
Author

@prajjwaldimri
Copy link
Author

Alright got it. Its the file prefs.js which is automatically generated by the firefox browser. There is a user pref stored there which is altered every time a user changes their theme.

For Light:

user_pref("lightweightThemes.selectedThemeID", "firefox-compact-light@mozilla.org");

For Dark:

user_pref("lightweightThemes.selectedThemeID", "firefox-compact-dark@mozilla.org");

Default Theme:

user_pref("lightweightThemes.selectedThemeID", "default-theme@mozilla.org");

However, it can be overridden by specifying the same key in a optional user.js file which can be created inside the same directory.

@bipox
Copy link

bipox commented Apr 12, 2019

That would be great.

In case you didn't know: you can already do this in Firefox with the automaticdark addon. And if you use Darkreader there's an option for automatic theme change too.

@C2N14
Copy link
Owner

C2N14 commented May 18, 2019

It's been a while, but I'll look into it :)

@C2N14 C2N14 added the enhancement New feature or request label May 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants