From 6207d8a75e40aa76008edaffbbe138bbc9f6baa4 Mon Sep 17 00:00:00 2001 From: auric <104602845+ihateamongus@users.noreply.github.com> Date: Thu, 11 Sep 2025 15:13:57 -0500 Subject: Add dynamic Firefox accent color extension --- browsers/firefox/update-userchrome.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 browsers/firefox/update-userchrome.sh (limited to 'browsers/firefox/update-userchrome.sh') diff --git a/browsers/firefox/update-userchrome.sh b/browsers/firefox/update-userchrome.sh new file mode 100755 index 0000000..dae5d97 --- /dev/null +++ b/browsers/firefox/update-userchrome.sh @@ -0,0 +1,10 @@ +#!/bin/sh +set -eu +ACCENT="$(../getaccent 2>/dev/null || echo)" +[ -n "$ACCENT" ] || ACCENT="#000000" +PROFILE_DIR="${HOME}/.mozilla/firefox" +PROFILE="$(ls "$PROFILE_DIR" | grep default | head -n1 || true)" +[ -n "$PROFILE" ] || { echo "No Firefox profile found" >&2; exit 1; } +PROFILE="$PROFILE_DIR/$PROFILE" +mkdir -p "$PROFILE/chrome" +sed "s/ACCENT/$ACCENT/" userChrome.template.css > "$PROFILE/chrome/userChrome.css" -- cgit v1.2.3