madodig / trilium-widget-theme-switch

Trilium widget for changing themes
GNU General Public License v3.0
14 stars 0 forks source link

Trilium widget - Theme Switch

Trilium widget for changing themes

Trilium Notes (https://github.com/zadam/trilium)
A hierarchical note taking application with focus on building large personal knowledge bases


Features

This Trilium widget enables:

Possible customizations:

The widget activates the new theme by updating stylesheets in the DOM (Document Object Model). This results in more fluid UX, but might not be the preferred way. It is possible to configure the frontend to reload when changing themes.

Toggling between theme modes works for themes that have light/dark variant set in the theme ID (appTheme label). To support toggling, when importing new themes in Trilium, make sure you either append the '-light' and '-dark' suffixes or configure the alternate modes in the 'configuration' note.

Installation

Download the ZIP file from releases and import it to Trilium (mark the 'Safe import'). When imported, select the 'installer' note and execute it, or add owned attribute #widget to the 'Theme Switch' note and reload the Frontend.

The 'installer' note can be removed after the installation.

Tested on Trilium desktop v0.60.4

Demo

https://github.com/madodig/trilium-widget-theme-switch/assets/14966219/17033f83-0eed-45af-aac0-9df3a37646dc