Skip to content

Implement theme command. - #1711

Merged
pazz merged 7 commits into
pazz:masterfrom
dylanfprice:theme-command-2
Jun 1, 2026
Merged

Implement theme command.#1711
pazz merged 7 commits into
pazz:masterfrom
dylanfprice:theme-command-2

Conversation

@dylanfprice

@dylanfprice dylanfprice commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #1588. Took inspiration from #1603.

Testing

I switched back and forth between a few different themes I have and visually it seemed to work great. I also was able to switch back to the default theme with :theme default.theme.

I switched to the same theme I was already using and verified that it didn't rebuild the buffer (e.g. the thread I was viewing didn't reset its collapsed state).

I tried loading :theme doesntexist and saw the error message in the UI.

I sabotaged one of my theme files and tried to load it. I saw an error message in the UI and this in the logs:

ERROR:theme:Theme file `/home/dylan/.config/alot/themes/solarized-light` failed validation: key "footer" in section "global" is missing.

I added a few unittests for the get_theme function I wrote.

Docs

I took a stab at updating the docs, but didn't try to build it or anything. I didn't realize the command docs were generated, fixed.

@dylanfprice

Copy link
Copy Markdown
Contributor Author

@pazz the workflow should pass now

@dylanfprice

Copy link
Copy Markdown
Contributor Author

@pazz @lucc

@lucc lucc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to work for me and to code looks good.

@pazz you were in favor of this in #1588, so I will leave the rest to you.

@pazz
pazz merged commit c941f52 into pazz:master Jun 1, 2026
1 check passed
@pazz

pazz commented Jun 1, 2026

Copy link
Copy Markdown
Owner

thanks

@dylanfprice
dylanfprice deleted the theme-command-2 branch June 4, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

change colorscheme at runtime ?

3 participants