Theme Switch widget #4393
Replies: 5 comments 2 replies
-
Wow, your work is truly brilliant. This makes theme switch so easy. I've added it to https://github.com/Nriver/awesome-trilium |
Beta Was this translation helpful? Give feedback.
-
Very nice! Great work 👍 |
Beta Was this translation helpful? Give feedback.
-
Love this! im a noob with Trilium, im not using the desktop version, how do i import this? |
Beta Was this translation helpful? Give feedback.
-
Hey Madodig
Thanks for this, I was able to import the switch and set it as a widget. However I am running into this error when trying to select the switch or theme
You're passing an async function to api.runOnBackend() which will likely not work as you intended. Either make the function synchronous (by removing 'async' keyword), or use api.runAsyncOnBackendWithManualTransactionHandling(
Are you able to help
From: madodig ***@***.***>
Sent: Thursday, February 22, 2024 11:39 AM
To: zadam/trilium ***@***.***>
Cc: David Cooper ***@***.***>; Comment ***@***.***>
Subject: Re: [zadam/trilium] Theme Switch widget (Discussion #4393)
You don't often get email from ***@***.******@***.***>. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
Hi!
You would install it just as any other widget, by importing the ZIP file.
Download the latest release<https://github.com/madodig/trilium-widget-theme-switch/releases/> and import it to your Trilium instance (right click on a parent note where you want this note to be placed, click on "Import into note", choose the downloaded ZIP file, uncheck "Safe import" option and click on "Import". Then choose the Theme Switch note, select "Owned Attributes" (second icon from the left below the note title) and type "#widget" (without the quotes) to the end of the attributes list. Then reload the Trilium frontend (F5 or Ctrl+R).
Make sure that the self-hosted deployment is properly installed (the recommended way to deploy Trilium on servers is running it as a docker image), otherwise widgets (in general) might not work.
-
Reply to this email directly, view it on GitHub<#4393 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BDEKDWPG3ZQJQ7A7JHI5333YU2HQNAVCNFSM6AAAAAA653P4W2VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DKNJQGMYDO>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
-
@madodig I get this error and now i cannot open my notes |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've shared the following Theme Switch widget: https://github.com/madodig/trilium-widget-theme-switch
The widget enables easy switching between themes and (optionally) automatic switching between light/dark mode based on the time of the day.
It is possible to:
define a time range in which the light and dark mode should be activated.
DEMO:
trilium-widget-theme-switch-demo.mp4
Thanks to @zadam for helping me with updating Option / Theme via private API.
Beta Was this translation helpful? Give feedback.
All reactions