-
Notifications
You must be signed in to change notification settings - Fork 0
Imports
Little Kwinso edited this page Dec 17, 2022
·
3 revisions
Themer's custom blocks allow you to inject contents from another file on your file system.
To import a file you do this:
<import /path/to/file>
Pretty straight forward, isn't it? But the cool part is you can use variables inside import paths:
<import /path/to/theme-<name>>
So you can create different files for different themes.
You still can use variables inside your file, every variable like <name> or <vars still can be used. To this allows you to do even more stuff:
# Insides of the imported file
theme = "<name>"
if theme == "dark": print("It's a dark theme!")
if theme == "light": print("Meh...")The only one limitation that comes with imports is that you can't import files from already imported files, otherwise Themer will show an error message when you try to set theme.