Skip to content

About

Switch between a light and a dark Omarchy theme on a local-time schedule.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

Theme Sync

Switch between a light and a dark Omarchy theme on a local-time schedule.

preview.mp4

The plugin runs inside Omarchy Shell as a headless service: it reads the local hour on a timer and, when the current theme is the configured light or dark theme, hands it to omarchy theme set. Nothing else is touched — no wallpaper of its own, no systemd unit, no second Quickshell process.

By default a theme switch also swaps the wallpaper, the way omarchy theme set does on its own. Set keepBackground to true to switch only the palette and leave whatever wallpaper is showing — a live wallpaper, or one picked by hand — in place.

A bar widget cycles three modes with a click:

  • Auto — the schedule decides (light from lightFrom, dark from darkFrom)
  • Light — pinned to the light theme
  • Dark — pinned to the dark theme

The mode survives restarts and is re-asserted on login. While pinned, the schedule is suspended: switch themes freely, and the plugin leaves them alone until you click back to Auto.

Theme Sync

Requirements

  • Omarchy 4 (Quattro) or newer, with the Quickshell plugin system
  • omarchy theme set, shipped with Omarchy — nothing else

Install

omarchy plugin add https://github.com/geoochi/omarchy-theme-sync.git --enable

The service starts immediately. To also get the bar button, enable it with a placement (it defaults to the right section):

omarchy plugin enable io.github.geoochi.theme-sync --section right --after omarchy.power

omarchy bar move io.github.geoochi.theme-sync --section right moves it later.

Configure

Defaults are a light theme from 06:00 and a dark one from 18:00. Override any of them in ~/.config/omarchy/theme-sync/config.json:

{
  "lightTheme": "catppuccin-latte",
  "darkTheme": "tokyo-night",
  "lightFrom": 6,
  "darkFrom": 18,
  "checkIntervalMinutes": 10,
  "keepBackground": false
}

keepBackground defaults to false, which keeps Omarchy's per-theme background. Set it to true and the plugin passes OMARCHY_THEME_SKIP_BACKGROUND=1 to omarchy theme set, so a scheduled switch retints the desktop without touching the current wallpaper. A theme you switch to by hand still changes it — only the plugin's own switches are affected.

The file is watched, so saving it applies the new schedule immediately. Deleting it falls back to the defaults above. A config.json created after the shell already started is picked up on the next check rather than instantly.

Times are local: the hour comes from the system clock in the timezone the session is running in, so changing timezone (or crossing a DST boundary) is picked up on the next check.

How it decides

  • Outside the configured pair — a theme you picked by hand, or a third theme — the current theme is never replaced. Switch back to either half of the pair and the schedule takes over again.
  • A theme you set by hand inside the pair survives until the next check, then the schedule wins. That is the same contract the shell script version had.
  • Saving or deleting config.json is an explicit action, so it syncs immediately — even over a theme you picked by hand. Switching modes from the bar or IPC is the same: an explicit instruction wins.
  • Nothing happens when the theme is already the right one, and only one omarchy theme set runs at a time.

Usage

omarchy-shell theme-sync status                  # current state as JSON
omarchy-shell theme-sync applyNow                # apply the theme for this hour right now
omarchy-shell theme-sync reload                  # re-read the config and the current theme
omarchy-shell theme-sync setMode light|dark|auto # pin or unpin the schedule
omarchy-shell theme-sync cycleMode               # auto -> light -> dark -> auto

The bar button does what cycleMode does.

Remove

omarchy plugin remove io.github.geoochi.theme-sync

Removing the plugin leaves ~/.config/omarchy/theme-sync/config.json in place so a later reinstall reuses your schedule. Delete it separately if you do not want that.

License

MIT — see LICENSE.

About

Switch between a light and a dark Omarchy theme on a local-time schedule.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages