Theme Switch

Theme Switch

Plugin from JanitorHead

Overview

A simple one-click light/dark theme switch for the Unraid webGUI. It adds a sun/moon button to the header toolbar (on every page) that cycles Auto -> Light -> Dark. In Auto it follows your browser/OS colour scheme (prefers-color-scheme) and flips live when the OS does. The switch is instant and per-client: it happens in your browser with no page reload and without changing any server setting, so different clients and operating systems each get the right look without fighting over Unraid's single shared theme. Simpler than Dynamix Day/Night - no schedules, just a button and your OS. Fully supported on Unraid 7.x; installs harmlessly on older versions (the button simply does nothing if the theme layout isn't recognised).

Theme Switch — Unraid light/dark toggle

A small Unraid plugin that adds a one-click light/dark switch to the webGUI header and can follow your operating system's colour scheme automatically. Simpler than Dynamix Day/Night — no schedules, just a button and your OS.

  • Header toggle — a sun/moon button in the Unraid top toolbar (not a dashboard widget), available on every page.
  • Three modes, cycled by clicking the button: Auto → Light → Dark.
    • Auto follows your browser/OS prefers-color-scheme and flips live when the OS does.
    • Light / Dark are manual overrides that stick until you cycle back to Auto.
  • Instant & per-client — the switch happens in your browser with no page reload and no server settings changed, so each client (and each OS) gets the right look without fighting over Unraid's single shared theme setting.

How it works

Unraid renders the active theme as one stylesheet <link> (white/azure/black/gray). Theme Switch repoints that <link> and swaps the <html> Theme--* class in the browser, deriving the light/dark pair from whichever theme the server is set to:

Server theme Light Dark
white / black (top-nav) white black
azure / gray (sidebar) azure gray

It stays within a layout family, so toggling only changes colours — never the page layout. Your chosen mode is stored in localStorage (per browser) and synced across open tabs. In dark mode it also forces the header bar dark and keeps command-execution output (e.g. docker run) readable, which Unraid's stock dark themes don't fully cover. The Community Applications (Apps tab) plugin ships its own per-theme stylesheet, rendered for the server's theme; Theme Switch repoints that one too, so the Apps grid follows the toggle instead of leaving dark-on-dark (invisible) app cards.

Install

Unraid → Plugins → Install Plugin → paste:

https://raw.githubusercontent.com/JanitorHead/unraid-themeswitch/master/themeswitch.plg

Then hard-refresh the browser (Ctrl+Shift+R) once so the global script loads.

Compatibility

  • Unraid 7.x — fully supported (verified against the variable-based theme system).
  • Older Unraid — installs without error; if the theme layout isn't recognised the button simply does nothing, so it can't break the page.

Unraid Connect header

The server name, notification bell and account dropdown/hamburger live in the Unraid Connect header island, which tracks its own light/dark scheme independently of the theme. When a forced theme disagrees with that scheme those items can end up the wrong colour and disappear against the header band. Theme Switch recolours the island to contrast the band in every theme and mode, so they stay legible.

Building

themeswitch.plg is generated from source/ — never hand-edit it. After changing anything under source/themeswitch/…, regenerate (version defaults to today's date):

build/make-standalone-plg.sh

The plugin ships as a self-contained inline .plg (no separate .txz to host): the web files are embedded directly and written to /usr/local/emhttp/plugins/themeswitch/ on install.

License

MIT © JanitorHead.

Install Theme Switch on Unraid in a few clicks.

Find Theme Switch in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for Theme Switch Review the template variables and paths Click Install

Download Statistics

0
Total Downloads
76
This Month
6
Avg / Month

Downloads by Month

Loading chart...

Related apps

Explore more like this

Explore all

Details

Repository
https://raw.githubusercontent.com/JanitorHead/unraid-themeswitch/master/themeswitch.plg
Last Updated2026-07-24
First Seen2026-07-23