Pywalfox is an addon used to theme Firefox using your pywal colors.
- Customizable colors
- Uses the Firefox Theme API (no CSS required!)
- Automatic theming for DuckDuckGo (Optional)
- Custom CSS with bold text, styled dropdowns, etc. (Optional)
- Update the browser theme using the addon and/or your terminal
You can download the Firefox add-on here: https://addons.mozilla.org/en-US/firefox/addon/pywalfox/
To use this add-on, you must install a script on your computer. The script fetches your pywal colors and will be run by Firefox upon launch. As of now, Pywalfox supports only Linux.
- Python (both 2.7.x and 3.x versions are supported)
- pywal
- Firefox
- Linux
git clone https://github.com/Frewacom/Pywalfox.git
cd Pywalfox
bash setup.sh
If the setup is successful, it should look something like this:
Creating 'native-messaging-hosts' folder in ~/.mozilla
Copying native messaging manifest to /home/<username>/.mozilla/native-messaging-hosts/pywalfox.json
Setting path to daemon/pywalfox.py in the manifest
Setting execution permissions on daemon/pywalfox.py
Finished.
Restart Firefox and you should be able to fetch the colors using the Settings page. If not, take a look in the Troubleshooting section below.
If you are using some script for theming your system and do not want to manually refetch your pywal colors using the settings page, you can trigger an update of the browser theme by running ./daemon/pywalfox.py update
in your terminal (the script is not in your PATH
by default).
Pywalfox comes with custom CSS that you can enable if you want to. It applies your pywal colors to context menus and other elements of the browser that are not available using the Firefox Theme API. If you want to use this feature, you must do the following:
- Navigate to
about:config
in Firefox - Set
toolkit.legacyUserProfileCustomizations.stylesheets
totrue
- Enable the
Custom CSS
option in the Settings page of the addon
- If you updated Pywalfox and have issues, try re-running the setup script as described above.
- If you do not have permission to copy files to
.mozilla/native-messaging-hosts
, you can either run
chown <username> ~/.mozilla/native-messaging-host
or (if the folder is empty) simply remove it and the setup script will recreate it with the correct permissions. - Take a look at the Debugging output in the Settings page of the addon
- Make sure that
path
in~/.mozilla/native-messaging-hosts/pywalfox.json
points to the location ofdaemon/pywalfox.py
- Make sure that
pywalfox.py
is executable (chmod +x pywalfox.py
) - Make sure that the file
~/.cache/wal/colors
exists and contains the colors generated by pywal - Take a look at the Browser console (
Tools > Web developer > Browser console
) for errors
-
ExtensionError: No such native application pywalfox
The manifest is not installed properly. Follow the instructions here: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests. The manifest is located at
daemon/assets/pywalfox-manifest.json
.If you still can not get it to work, you could try reinstalling Firefox: #14
-
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist.
The path to the script in the manifest is invalid or the script crashed on execution (try running it manually).
The script runs in an infinite loop, so as long as the script does not crash when running it, we know that the issues lies somewhere else.
If you encounter any other errors: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging#Troubleshooting