AutomaThemely icon indicating copy to clipboard operation
AutomaThemely copied to clipboard

Suggestion: Automatically switch theme of Mozilla Firefox

Open prajjwaldimri opened this issue 6 years ago • 4 comments

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 avatar Mar 27 '19 05:03 prajjwaldimri

This is relevant: https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data

prajjwaldimri avatar Mar 27 '19 05:03 prajjwaldimri

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", "[email protected]");

For Dark:

user_pref("lightweightThemes.selectedThemeID", "[email protected]");

Default Theme:

user_pref("lightweightThemes.selectedThemeID", "[email protected]");

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

prajjwaldimri avatar Mar 27 '19 05:03 prajjwaldimri

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.

bipox avatar Apr 12 '19 14:04 bipox

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

C2N14 avatar May 18 '19 18:05 C2N14