Skip to content

feat(razer): update theme sync to host api and add palette role selector - #916

Merged
ItsLemmy merged 1 commit into
noctalia-dev:mainfrom
detluck:update-razer-plugin
Oct 4, 2026
Merged

ItsLemmy merged 1 commit into
noctalia-dev:mainfrom
detluck:update-razer-plugin

Conversation

@detluck

@detluck detluck commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Plugin

  • Id: detluck/razer
  • New plugin
  • Update to an existing plugin (version bumped in plugin.toml)

What it does

Closes #864
Supersedes #902

  • Native Theme Sync API: Migrated theme color resolution from custom filesystem parsing to Noctalia's native host API noctalia.getColor(role) (plugin_api = 31), strictly falling back to Razer Green (#00FF00) if unavailable.
  • Palette Role Selector: Added an interactive expandable dropdown menu in the Razer Control Center panel allowing users to select any of Noctalia's 16 palette roles (primary, surface, secondary, tertiary, hover, etc.) with live circular color preview swatches.
  • Direct Per-Device Controls: Removed redundant global sync_theme_color and theme_role settings from plugin.toml in favor of direct per-device controls in the panel, eliminating conflicts between manual presets (Razer Green, Spectrum, Off, Custom Color) and background auto-sync.
  • Version bump: Bumped version from 1.0.0 to 1.1.0.

External dependencies

As before:

  • openrazer-daemon: Provides the local session D-Bus interface (org.razer) for Razer hardware control.
  • busctl: Queries and applies hardware state over the user session D-Bus.
  • systemctl: Used by the "Start Daemon" fallback button in the panel if the user service is inactive.

Testing

  • Tested on Niri
  • Tested on Hyprland
  • Tested on Sway
  • Tested on another compositor:
  • Noctalia version tested against: 5.2.1
  • Plugin API level: 31
  • Test details:
    • Tested hot theme switching live in Noctalia settings; Razer hardware LED colors and panel preview swatches update immediately upon palette changes.
    • Tested switching through all 16 theme roles in the panel dropdown menu, verifying preview color chips, checkmarks, and corresponding RGB hardware output.
    • Verified manual lighting presets (Razer Green, Spectrum, Off, custom hex) persist across poll cycles without being overridden by auto-sync.

Screenshots / Videos

image image

Checklist

Ready-for-review requirement: Every box in this section must be checked. If any statement is not true, keep the
pull request as Draft. An explanation does not replace a required check.

  • The directory name matches the part of id after the / in plugin.toml exactly.
  • It ships plugin.toml, README.md, thumbnail.webp, and translations/en.json.
  • README.md follows the
    README template, documents
    every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
  • thumbnail.webp is present and relevant; for a new plugin I created it with the thumbnail generator, and for an update I regenerated it with the generator if the visual identity or user-facing appearance changed.
  • version follows semver and is bumped in this PR; plugin_api is the oldest API level this plugin requires.
  • Every non-English translation in this PR uses a locale supported by Noctalia core, and I can read, write, and
    understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
  • I did not edit catalog.toml; CI generates it.
  • This PR touches exactly one plugin directory.

Code review attestation

Plugins run as trusted, unsandboxed Luau in the user's session. Confirm:
Ready-for-review requirement: Every attestation below must be checked.

  • The code is readable and not obfuscated, minified, or generated.
  • It does not download and execute remote code.
  • Every network call, filesystem write, and spawned process is something the description above accounts for.
  • I have the right to publish this code under the license declared in plugin.toml.

@ItsLemmy
ItsLemmy merged commit 1ae8bda into noctalia-dev:main Oct 4, 2026
3 checks passed
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.

[razer][FEATURE]

2 participants