$darkmode
Elektra 0.11.0
|
This file explains how Firefox preferences can be manipulated at run-time using Elektra’s intercept open and a custom autoconfig script.
kdb configure-firefox -s
will configure everything needed to get started.
/usr/lib/firefox
/ /usr/lib/firefox-esr
defaults/pref/autoconfig.js
Loads elektra.cfg
``` pref("general.config.filename", "elektra.cfg"); pref("general.config.obscure_value", 0); ```
elektra.cfg
Contains the autoconfig code~/.mozilla/firefox/<profile>/prefs.js
Contains the user preferences. The configure-firefox script will append the config for our autoconfig script:Every time the string reload
is send to localhost:elektra.config.reload_trigger_port
the autoconfig script will import the preferences from elektra.config.file
elektry.config.file
contains the name of the dummy file for intercept open
. open
calls to this file will be intercepted and the content generated by intercept open
Running kdb configure-firefox -a
provides a guided setup for adding http_proxy and homepage preferences.
This example shows how to manually setup a preferences. It's equivalent to the example shown above in the Guided setup
Running kdb configure-firefox -t
will set up some test values.
Changing locked values doesn't work without restarting.