Changing Leo to use a dark theme

212 views
Skip to first unread message

Universal Software

unread,
Oct 12, 2022, 5:55:56 AM10/12/22
to leo-editor
I'm sorry if this has been asked before.  I'm not new to Leo.  I've used it for a few years, but I've been making more use of it again recently and wondered how to change to a dark theme.
I can open a dark theme from the menu, but that opens a new instance, and then my original instance becomes locked.  I just want to open Leo and it default to my chosen theme.
Many thanks.

Kind regards,
Rich.T.

Thomas Passin

unread,
Oct 12, 2022, 9:58:45 AM10/12/22
to leo-editor
You have to add a setting to your myLeoSettings.leo file.   In fact, that's how you do just about all configuration of Leo.  Add a new node as a child of the @settings node at the top of the file.  Give the node the headline @string theme-name = minimal-ui-tbp_dark_solarized except use the name of the theme you actually want to use (this example is the one I usually use).   You do not need to include the theme file extension (i.e., ".leo").   Save the myLeoSettings.leo file.  The next time you start Leo, it will use the theme you specified.  

You can open Leo with a different theme by adding --theme=themename to the command line that you launch Leo with - using the actual name of the theme you want to use. This will override the name in the settings file.

A few other settings you might like to try - create a new node in the @settings tree for each:

To have the cursor line in the body highlighted: @bool highlight-body-line = True
To show a vertical guideline at the right margin:  @bool show-rmargin-guide = True
To show line numbers in the gutter: @bool use_gutter = True
    The line numbers may not be aligned with the lines.  To adjust their alignment. add a new settings node: @int gutter-y-adjust = 7
    Keep trying different numbers until the alignment of numbers with lines is OK.

To make the new settings take effect, either restart Leo or select the Settings/Reload Settings/Reload-settings menu item.  The new settings will apply to all outlines opened afterwards.

Universal Software

unread,
Oct 12, 2022, 10:17:18 AM10/12/22
to leo-e...@googlegroups.com
Wow, thank you.  I didn't think it was that simple.  I had pictured having to copy individual settings from the theme file into my settings file :-)

Much appreciated.

Kind regards,
Rich.T.

--
You received this message because you are subscribed to a topic in the Google Groups "leo-editor" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/leo-editor/hNqI45BJaJE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/278e20b2-d81f-4748-a038-4b54085c29b9n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages