Omahub
← All plugins
A

Theme Scheduler

by acrogenesis

Automatically switch between light and dark Omarchy themes at sunrise and sunset, or at fixed times.

Security review

No obvious issues detected

Deterministic scan — not a security guarantee

None
Risk level
None
Analyzed commit
54c2f0a
Scanned
1 month ago

No potentially dangerous behavior detected in the analyzed commit.

Automated analysis only — not a security guarantee.

AI advisory review

No obvious issues detected

Language-model assessment · ~deepseek/deepseek-v4-flash-latest — advisory only

None
AI risk level
None
Recommendation
install
Model
~deepseek/deepseek-v4-flash-latest
Analyzed commit
54c2f0a
Reviewed
1 month ago

The plugin is a straightforward theme scheduler that reads local config and system timezone data, computes sunrise/sunset, and applies themes via the standard `omarchy theme set` command. No network access, no destructive operations, no obfuscation, and all file reads are limited to user-owned config and standard system files. The deterministic scan found no issues, and our review agrees.

How this check works

This review combines the deterministic scan (the rule-based results above) with an independent look at the plugin's code by a language model. The model reads a trimmed sample of the repository's files, the manifest, and the README, then gives a plain-language risk level and a recommendation: install (no notable danger), review (look closer first), or avoid (clearly dangerous).

It runs on the same analyzed commit as the deterministic scan and is strictly advisory — it is not a security guarantee and never blocks a plugin by itself. A human moderator still reviews plugins before they are listed.

AI advisory only — automated analysis, not a security guarantee.

Install
$ omarchy plugin add https://github.com/acrogenesis/omarchy-theme-scheduler --enable
Appearance #bar #quickshell

Theme Scheduler for Omarchy

Automatically switch between a light and dark Omarchy theme at sunrise and sunset, or at times you set. The plugin runs inside Omarchy Shell, catches up after sleep or restart, and does not require root access or systemd units.

The Theme Scheduler panel set to sunrise and sunset, showing the location picked up from the system timezone and today's computed sun times

Features

  • Independent day and night themes
  • Sunrise/sunset scheduling, computed locally, from a location it works out for itself
  • Random light and dark choices using each theme's Omarchy mode metadata
  • 15-minute schedule controls
  • Local-time operation with overnight schedules supported
  • Resume/restart catch-up
  • Manual theme overrides remain until the next scheduled boundary
  • Bar panel, middle-click “apply now,” and shell IPC controls
  • Configuration stored at ~/.config/omarchy/theme-scheduler/config.json

Install

omarchy plugin add https://github.com/acrogenesis/omarchy-theme-scheduler.git --enable

The plugin is safe on first install: its internal automation toggle defaults to off. Add its widget to the bar, choose the two themes and times, then enable automatic switching.

Requirements

  • Omarchy 4 with the Quattro shell plugin API
  • No external packages, root access, or background system services

Remove

omarchy plugin remove acrogenesis.theme-scheduler

Removing the plugin leaves its settings at ~/.config/omarchy/theme-scheduler/config.json so a later reinstall can reuse them. Delete that file separately only if you also want to discard the saved schedule and theme choices.

For local development:

ln -sfn "$PWD" ~/.config/omarchy/plugins/acrogenesis.theme-scheduler
omarchy plugin enable acrogenesis.theme-scheduler --section right

Commands

omarchy-shell acrogenesis.theme-scheduler status
omarchy-shell acrogenesis.theme-scheduler enable
omarchy-shell acrogenesis.theme-scheduler disable
omarchy-shell acrogenesis.theme-scheduler applyNow

How scheduling behaves

At each day/night boundary, the service applies the configured theme with omarchy theme set. It records that boundary after a successful switch. This means choosing another theme manually will not be immediately undone; the scheduler takes control again at the next boundary.

The day and night pickers also offer Random light theme and Random dark theme. Omarchy declares the classification as mode = "light" or mode = "dark" in each theme's effective colors.toml. Themes without that metadata remain available for explicit selection but are excluded from random choices. Each picker lists its matching mode first, the opposite mode second, and any unclassified themes last; themes within every group are alphabetical.

The service evaluates the wall clock every minute. If the computer sleeps through a boundary or Omarchy Shell starts later, it applies the theme for the current period when it resumes.

Solar scheduling

Choose Sunrise & sunset in the panel. There is usually nothing else to set: the panel names the location it is using, and offers coordinate fields only if you want to override it.

Sunrise and sunset are computed on the spot with the NOAA solar position algorithm, so there is no network request, no cached almanac to go stale, and no IP geolocation. It works at boot before Wi-Fi associates, on a plane, and with the network disconnected entirely.

The panel shows the computed times for today so you can check them against an almanac at a glance. Optional offsets shift the switch relative to the sun by up to two hours in either direction, for anyone who wants dark half an hour before sunset.

Where the location comes from

Coordinates are taken from the first of three sources that has them:

  1. Coordinates entered in this panel. Only these are saved to the plugin's own config.
  2. Omarchy's shared location, at ~/.local/state/omarchy/settings/weather.json — the same file the weather panel uses. Set it once and both follow it:
    omarchy-weather-location --set "Melbourne" -37.8136,144.9631
    
  3. Your system timezone. tzdata records the coordinates of each zone's reference city, so Australia/Melbourne resolves to Melbourne without anything being configured at all. This is why the plugin generally works correctly the moment it is installed.

Nothing inherited is ever copied into the plugin's config, so changing your weather location or your timezone moves the sun immediately. Clearing the coordinate fields returns to whatever the system provides.

Coordinates only need to be roughly right: a whole degree of latitude moves sunrise by two or three minutes, so a nearby city is fine — which is exactly why a timezone is a good enough answer.

If no source has a location, the fixed times take over, as they do in the two cases where sun-derived boundaries cannot describe a schedule — polar days when the sun never rises or never sets, and days inside the polar circles when sunrise and sunset fall either side of local midnight.

Development

node tests/test_schedule.js
bash tests/test_theme_catalog.sh
bash tests/test_timezone_location.sh
omarchy plugin validate .
qmllint -I /usr/share/omarchy/shell ./*.qml

License

MIT