From 01faa0e52ebeab59fca7d312fc5851f868b46c94 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 19 Jul 2024 11:09:51 -0300 Subject: Fix: attempt to fix the chrome syncing workflow --- README.md | 14 ++++++++++++-- firefox-chrome-sync | 18 ++++++++++++++++++ firefox-dev | 2 +- firefox-profile | 2 +- 4 files changed, 32 insertions(+), 4 deletions(-) create mode 100755 firefox-chrome-sync 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 # -- cgit v1.2.3