Install a theme to a Firefox or its derivatives browser profile automatically
Go to file
Moririn 5ce8c1def2 Merge pull request 'symlink-config-home' (#1) from symlink-config-home into master
Reviewed-on: #1
2023-09-18 16:10:49 +00:00
chrome Apply transparency to find and bookmarks bar 2023-09-18 16:46:57 +01:00
LICENSE Initial commit 2023-08-21 13:40:49 +00:00
README.md Update README.md 2023-09-18 17:01:58 +01:00
foxtheme.sh Make THEMEDIR a variable 2023-09-12 17:58:32 +01:00
user.js Initial commit 2023-08-21 14:57:56 +01:00

README.md

Firefox theme installer

Automated installation of userChrome theming for Firefox and its derivatives' interface via a shell script. Included theme originally modified from Filip Sutkowy's blurclean-firefox-theme (GitHub).

Description

This script will create or modify the following files and directories:

  • $XDG_CONFIG_HOME/foxtheme/chrome/ and subsidiary CSS files will be created if they do not exist, or overwritten if -o is passed, in order to provide the necessary styles
  • <browser profile directory>/chrome will be created as a symlink to $XDG_CONFIG_HOME/foxtheme/chrome/
  • <browser profile directory>/user.js will be created if it does not exist, or appended to in the case of an existing user.js, in order to modify the necessary about:config settings for the theme
  • <browser profile directory>/user-overrides.js will be created instead of user.js if it does not exist and -r is passed, or appended to in the case of an existing user-overrides.js, with the same modifications as the regular user.js file in order to ensure current or a potential future compatibility with the arkenfox user.js (GitHub) or similar

Options

Usage: ./foxtheme.sh [OPTIONS] [PROFILE | -a PROFILESDIR]
-h		Display this help message
-o		Remove and replace an existing theme if found
-a		Apply theme to all (current) browser profiles
-r		Apply modifications to user-overrides.js instead of user.js
-d		Don't modify existing user.js values. May cause the theme to behave incorrectly

Custom themes

This script is ultimately just a glorified wrapper for:

mkdir $XDG_CONFIG_DIR/foxtheme/
cp -r chrome/ $XDG_CONFIG_DIR/foxtheme/
ln -s -f $XDG_CONFIG_DIR/foxtheme/chrome/ <browser profile directory>
cat user.js >> <browser profile directory>/user.js

As such, replacing the supplied user.js or contents of the chrome directory with custom preferences and themes should offer the same functionality.