tombl / firefox-dyntheme

Firefox dynamic theme reloader

Repository from Github https://github.comtombl/firefox-dynthemeRepository from Github https://github.comtombl/firefox-dyntheme

firefox-dyntheme

A tiny firefox extension with a native component that allows for hot-reloading themes.

This is not for userChrome.css, just regular firefox themes.

demo.mp4

Usage

Place a valid theme json file into:

  • linux: ~/.config/firefox-dyntheme/theme.json
  • windows: %APPDATA%\tombl\firefox-dyntheme\config\theme.json
  • mac: ~/Library/Application Support/dev.tombl.firefox-dyntheme/theme.json

Then send the native binary SIGUSR1 via killall -USR1 firefox_dyntheme or similar to reload.

Installation

Arch Linux

cd $(mktemp -d)
curl -LO https://raw.githubusercontent.com/tombl/firefox-dyntheme/main/pkg/PKGBUILD
makepkg -si

Other Linux

  • Head to the latest release
  • Click the xpi file to install the extension, and download the binary into /usr/libexec
    • You can install it another directory if you change the "path" in the manifest.
  • Copy the native manifest into a valid location such as /usr/lib/mozilla/native-messaging-hosts/dev.tombl.dyntheme.json or ~/.mozilla/native-messaging-hosts/dev.tombl.dyntheme.json.

Other OS/build from source

To build:

git clone https://github.com/tombl/firefox-dyntheme.git && cd firefox-dyntheme
(cd native && cargo build --release)
(cd ext && web-ext build)

To install:

  • Copy native/target/release/firefox_dyntheme to an appropriate place for binaries on your system
  • Copy the native manifest into a valid location, modifying the "path" to where you put the binary.
  • Install web-ext-artifacts/*.zip as an extension in firefox.

About

Firefox dynamic theme reloader

License:MIT License


Languages

Language:Shell 42.6%Language:Rust 42.3%Language:JavaScript 15.1%