{"id":20067576,"url":"https://github.com/gnrlleclerc/firefox-native-base16","last_synced_at":"2025-03-02T11:17:59.770Z","repository":{"id":250585086,"uuid":"834165175","full_name":"GnRlLeclerc/firefox-native-base16","owner":"GnRlLeclerc","description":"A simple native application that is able to watch a base16 TOML color file and send them to browser extensions for dynamic theme changes.","archived":false,"fork":false,"pushed_at":"2024-09-21T22:22:58.000Z","size":18,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-12T23:27:18.301Z","etag":null,"topics":["browser","native-messaging"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GnRlLeclerc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-26T15:00:37.000Z","updated_at":"2024-11-25T20:51:16.000Z","dependencies_parsed_at":"2025-01-12T23:36:00.021Z","dependency_job_id":null,"html_url":"https://github.com/GnRlLeclerc/firefox-native-base16","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"6f2d7e4142975f10234bd43d6870c0e85d0650ac"},"previous_names":["gnrlleclerc/firefox-native-base16"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GnRlLeclerc%2Ffirefox-native-base16","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GnRlLeclerc%2Ffirefox-native-base16/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GnRlLeclerc%2Ffirefox-native-base16/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GnRlLeclerc%2Ffirefox-native-base16/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GnRlLeclerc","download_url":"https://codeload.github.com/GnRlLeclerc/firefox-native-base16/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241494180,"owners_count":19971871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","native-messaging"],"created_at":"2024-11-13T14:02:05.930Z","updated_at":"2025-03-02T11:17:59.731Z","avatar_url":"https://github.com/GnRlLeclerc.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Firefox Native Base16\n\nA simple native application that can watch any base16 TOML color file for changes and communicate them to your browser.\n\n## Installation\n\nFor a quick installation on Linux, you can just run the [`install.sh`](./install.sh) script. Else, follow the instructions.\n\n### Building the binary\n\nYou must first build and install the native application, which requires `cargo` or `rustup` to be installed:\n\n```bash\ncargo install --git https://github.com/GnRlLeclerc/firefox-native-base16\n```\n\nOn Linux systems, the binary will be installed to `~/.cargo/bin/firefox-native-base16`.\n\n### Installing the native app\n\nIn order for the browser to indentify the native application, it needs a `manifest.json` file that points to the binary.\n\nNOTE: instructions for Linux / MacOS only. See [here](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests#manifest_location) for more information on where to put the app manifest.\n\nThe binary application must be launched from a bash script.\nThe binary application can be run with the `--colors-path` flag to specify a different path to the file holding the colors.\nThe default is `~/.mozilla/colors.toml`.\nNote that on Unix platforms, Firefox sends a `SIGTERM` signal to native applications when exiting. We need to explicitely transfer it to our underlying binary in the bash script in order to ensure that it is stopped when firefox exits.\n\n`~/.local/bin/firefox-native-base16-launcher`\n\n```bash\n#!/bin/bash\n\n# Kill the binary when SIGTERM is received\ntrap 'kill -SIGTERM $native_pid' SIGTERM\n\n# Run the binary in the background, storing its PID\n~/.cargo/bin/firefox-native-base16 \u0026\nnative_pid=$!\nwait $native_pid\n```\n\nMove this script in a directory present in your `PATH` (like `~/.local/bin`), and indicate this path instead in your native application manifest.\n\n```bash\nmkdir ~/.mozilla/native-messaging-hosts\njq \".path = \\\"$HOME/.local/bin/firefox-native-base16-launcher\\\"\" manifest.json \u003e ~/.mozilla/native-messaging-hosts/firefox_native_base16.json\n```\n\n## Related Extensions\n\nOnce your native application is setup, install the relevant browser extension.\n\n### Firefox\n\nSee the [Firefox Base16 Extension](https://github.com/GnRlLeclerc/firefox-dynamic-base16).\n\nYou can now update your `colors.toml` based on the [mustache template](./template.mustache) and watch your browser theme change dynamically!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnrlleclerc%2Ffirefox-native-base16","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnrlleclerc%2Ffirefox-native-base16","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnrlleclerc%2Ffirefox-native-base16/lists"}