summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFinn Petersen2021-07-22 21:14:39 +0200
committerFinn Petersen2021-07-22 21:44:04 +0200
commit5c5aa8c264c82a8f3b4ec64277b5580a7345250b (patch)
tree5ab05c67933ea8305762f33803bf99657bf83bad
downloadaur-5c5aa8c264c82a8f3b4ec64277b5580a7345250b.tar.gz
Provide a package to use firefox autoconfig from user home
Adds configuration files to the firefox installation in /usr/lib/firefox so that '$HOME/.mozilla/firefox/user.js' is loaded to set configuration settings. The file in the user home can be put under source control and synced between machines.
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD21
-rw-r--r--autoconfig.js2
-rw-r--r--firefox.cfg4
5 files changed, 48 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b1497d4f9831
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = firefox-user-autoconfig
+ pkgdesc = Make firefox use a source controllable autoconfig file in the user home
+ pkgver = 1
+ pkgrel = 1
+ url = https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig
+ arch = any
+ license = Unlicense
+ optdepends = firefox
+ backup = usr/lib/firefox/defaults/pref/autoconfig.js
+ backup = usr/lib/firefox/firefox.cfg
+ source = autoconfig.js
+ source = firefox.cfg
+ sha256sums = e46fd52157485b8567d486142e708ebd653823c29d839485821c950fdf614d36
+ sha256sums = 232e722832647cab17e3be69cc817edb90dadfd4a64ddc58fe5b8bf7224a7cf8
+
+pkgname = firefox-user-autoconfig
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..ce352eaa7863
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*
+!/firefox.cfg
+!/autoconfig.js
+!PKGBUILD
+!.SRCINFO
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..182d50d2a436
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,21 @@
+# Maintainer: Finn Petersen <fp7@posteo.net>
+pkgname=firefox-user-autoconfig
+pkgver=1
+pkgrel=1
+pkgdesc="Make firefox use a source controllable autoconfig file in the user home"
+url="https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig"
+arch=("any")
+license=("Unlicense")
+optdepends=("firefox")
+source=("autoconfig.js"
+ "firefox.cfg")
+backup=("usr/lib/firefox/defaults/pref/autoconfig.js"
+ "usr/lib/firefox/firefox.cfg")
+sha256sums=('e46fd52157485b8567d486142e708ebd653823c29d839485821c950fdf614d36'
+ '232e722832647cab17e3be69cc817edb90dadfd4a64ddc58fe5b8bf7224a7cf8')
+
+package() {
+ cd "$srcdir";
+ install -D -m 0644 autoconfig.js "$pkgdir/usr/lib/firefox/defaults/pref/autoconfig.js";
+ install -D -m 0644 firefox.cfg "$pkgdir/usr/lib/firefox/firefox.cfg";
+}
diff --git a/autoconfig.js b/autoconfig.js
new file mode 100644
index 000000000000..7c6fba9c279e
--- /dev/null
+++ b/autoconfig.js
@@ -0,0 +1,2 @@
+pref("general.config.filename", "firefox.cfg");
+pref("general.config.obscure_value", 0);
diff --git a/firefox.cfg b/firefox.cfg
new file mode 100644
index 000000000000..aca837b18c69
--- /dev/null
+++ b/firefox.cfg
@@ -0,0 +1,4 @@
+// IMPORTANT: Start your code on the 2nd line
+var home = getenv("HOME");
+
+lockPref("autoadmin.global_config_url", "file:" + home + "/.mozilla/firefox/user.js");