Skip to content

Exyeus/obsidian-theme-controller

Repository files navigation

Theme Controller

Theme Controller is an Obsidian community plugin that can switch themes on a schedule and edit theme CSS properties with snapshot-based rollback.

Features

  • Switch themes automatically based on time ranges you define.
  • Refresh and detect installed community themes from your vault.
  • Apply the matching rule immediately with a command or settings action.
  • Edit theme CSS custom properties from inside Obsidian.
  • Create snapshots before changes, restore older versions, or roll back to a chosen base snapshot.
  • Pin frequently used properties with sticky shortcuts while editing.

Commands

  • Apply theme for current time
  • Refresh installed theme list

How it works

  1. Open Settings -> Community plugins -> Theme Controller.
  2. Add one or more time rules.
  3. Pick the theme for each time range.
  4. Use Apply current rule now to test the result.
  5. Open the built-in theme editor to adjust CSS variables and save overrides.
  6. Create snapshots before larger edits so you can restore or roll back later.

Start time is inclusive and end time is exclusive. Overlapping rules are detected and shown as warnings in settings.

Theme editor

The theme editor scans editable theme files in .obsidian/themes, loads CSS custom properties, and lets you:

  • search properties by name or value
  • edit text and color values
  • save overrides back to the selected theme
  • create labeled snapshots
  • set a base snapshot
  • restore a snapshot or roll back to the base version

Installation

Manual install

Copy these files into your vault:

  • main.js
  • manifest.json
  • styles.css

Target folder:

<Vault>/.obsidian/plugins/theme-switcher/

Then reload Obsidian and enable Theme Controller in Settings -> Community plugins.

Development

npm install
npm run dev

Production build:

npm run build

Lint:

npm run lint

Compatibility

  • Plugin ID: theme-switcher
  • Name: Theme Controller
  • Version: 1.0.1
  • Minimum Obsidian version: 0.15.0
  • Desktop only: false

Notes

  • The plugin is designed for local use inside your vault.
  • Theme editing works on installed theme files that Obsidian can access locally.
  • If no editable theme files are found, install at least one community theme first.

About

This is a obsidian plugin that helps you to switch the theme of your obsidian in customized rules, like displaying light theme during the day while automatically switching to dark themes at night. It also provides a visualized interface for you to customize specific CSS properties of your current theme, offering backup for possible restoring.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors