Skip to content

Add Firefox template (userChrome.css / userContent.css) using the Noctalia palette - #82

Open
venus-fire wants to merge 1 commit into
noctalia-dev:mainfrom
venus-fire:add-firefox-template
Open

Add Firefox template (userChrome.css / userContent.css) using the Noctalia palette#82
venus-fire wants to merge 1 commit into
noctalia-dev:mainfrom
venus-fire:add-firefox-template

Conversation

@venus-fire

Copy link
Copy Markdown

Template

  • App: Firefox
  • Template id (directory): firefox
  • New template

What it themes

Firefox's native userChrome.css / userContent.css mechanism:

  • firefox-userChrome.css — tab bar, navigation toolbar, URL bar + results,
    bookmarks bar, sidebar, find bar, menus/panels, context menus, dialogs,
    autocomplete popups, download panel, web select dropdowns.
  • firefox-userContent.cssabout:newtab/home, about:preferences and its
    sub-dialogs, about:addons, about:logins, about:protections,
    about:config, about:profiles, etc.

Dark and light variants are generated; Firefox switches via prefers-color-scheme.
No extension required (the Pywalfox-based pywalfox/pywalfox-beta4 templates
stay available for the extension path).

Testing

Tested as a user template on this machine (Noctalia v5.0.0), theme applied via
noctalia msg templates-apply.

  • App version tested: Firefox 153.0.3 (profile under ~/.config/mozilla/firefox)
  • Applied a dark theme and confirmed the app picked it up (screenshots below)
  • Applied a light theme and confirmed the app picked it up
  • Re-applied twice and the app config is still correct (hooks are idempotent)

Screenshots

Firefox themed

Firefox about:preferences themed

Hooks

  • What the hook does: finds Firefox profiles by locating prefs.js
    (regular ~/.mozilla/firefox, $XDG_CONFIG_HOME/mozilla/firefox, Flatpak,
    Snap), creates the profile chrome/ dir, adds the Noctalia @import lines to
    userChrome.css/userContent.css, and enables
    toolkit.legacyUserProfileCustomizations.stylesheets,
    svg.context-properties.content.enabled and devtools.chrome.enabled
    through the profile's user.js.
  • It is idempotent: running it twice does not duplicate lines or corrupt the config.
  • It fails loudly (non-zero exit, message on stderr) when the app's config is missing.
  • It downloads nothing and executes nothing it did not ship in this directory.
  • It touches only this app's own config.

Checklist

  • The directory name matches the [catalog.firefox] id in template.toml.
  • category is one of: ai, audio, browser, chat, compositor, editor, gaming, launcher, system, terminal, misc.
  • Every input_path names a file that exists in this directory.
  • No generated output or app-specific personal config is committed.

…lia palette

Themes Firefox's browser chrome and about: pages via native userChrome.css/userContent.css. The apply hook discovers Firefox profiles (regular, XDG-config, Flatpak, Snap), wires up @import lines and enables the required prefs through user.js.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant