aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-07-19 11:09:51 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-07-19 11:09:51 -0300
commit01faa0e52ebeab59fca7d312fc5851f868b46c94 (patch)
tree0bc05d2ad4034cdd247317da0d59d284b5fbeb75
parent80cfb185fa2ccd974f9caa7d82065c7f8ad4e0fa (diff)
downloadfirefoxer-01faa0e52ebeab59fca7d312fc5851f868b46c94.tar.gz
firefoxer-01faa0e52ebeab59fca7d312fc5851f868b46c94.tar.bz2
Fix: attempt to fix the chrome syncing workflow
-rw-r--r--README.md14
-rwxr-xr-xfirefox-chrome-sync18
-rwxr-xr-xfirefox-dev2
-rwxr-xr-xfirefox-profile2
4 files changed, 32 insertions, 4 deletions
diff --git a/README.md b/README.md
index 60e0fb1..53cc96b 100644
--- a/README.md
+++ b/README.md
@@ -15,10 +15,16 @@ Inspired by:
* It's suggested to store profiles in the `~/.mozilla/firefox/profiles`.
-### Shared useChrome.css
+## Shared useChrome.css
There are many ways to reuse the same `userChrome` configuration among all your
-profiles:
+profiles.
+
+### Syncing
+
+### Symlinking
+
+Ideally, using symlinks could just work:
cd ~/.mozilla/firefox/profiles
for file in *; do
@@ -32,6 +38,10 @@ Example:
ln -s ../../../../apps/firefoxer/chrome $file/chrome;
done
+That would make syncing trivial.
+
+But it seems not to be the case: Firefox is not following symlinks.
+
### Suggested profiles
* `template`:
diff --git a/firefox-chrome-sync b/firefox-chrome-sync
new file mode 100755
index 0000000..f7ee418
--- /dev/null
+++ b/firefox-chrome-sync
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+#
+# Sync Firefox chrome config
+#
+
+# Parameters
+BASEDIR="`dirname $0`"
+BASE="$HOME/.mozilla/firefox"
+PROFILES="$BASE/profiles"
+
+# Go to the profiles folder
+mkdir -p $PROFILES
+cd $PROFILES
+
+# Dispatch
+for profile in *; do
+ rsync -av --delete $BASEDIR/chrome/ $profile/chrome/
+done
diff --git a/firefox-dev b/firefox-dev
index b04714c..dc3e3c4 100755
--- a/firefox-dev
+++ b/firefox-dev
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Wrapper around firefox developer edition
#
diff --git a/firefox-profile b/firefox-profile
index 34380f2..cedab89 100755
--- a/firefox-profile
+++ b/firefox-profile
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Wrapper around firefox
#