pazz / alot

Terminal-based Mail User Agent
GNU General Public License v3.0
683 stars 163 forks source link

feat: add a 'theme' command #1603

Open teto opened 2 years ago

teto commented 2 years ago

to be able to change the theme dynamically see https://github.com/pazz/alot/issues/1588

When running the command in development mode, I get: Could not read toto and/or /home/teto/alot/alot/settings/../defaults/theme.spec

What is weird too is that starting alot in development mode takes 5 sec while the system one starts <1 sec . The system alot took longer the first time though so I wonder if alot generates some cache along the way ? Same happened with neomutt, took a long time starting the first time I ran it in a while then successive starts were much faster. I've got 136675 messages in DB and ran a notmuch compact.

pazz commented 2 years ago

I have not yet tested this but I agree that this feature would be nice to have. I do not know why you see delayed startups in dev mode. perhaps printing the extra debug messages takes time due to some file system issue? There is certainly no caching going on as far as I am aware.

teto commented 2 years ago

It doesn't work yet for some reason, the error message Could not read toto and/or /home/teto/alot/alot/settings/../defaults/theme.spec seems wrong: the file exists so it's probably that it cant "load" it instead. Gonna troubleshoot

teto commented 2 years ago

still a WIP so no need to review yet but at least it's working. Planning to autocomplete theme name. I find working with alot colorschmes a bit painful, I wonder if we could not update this to an easier format. One painful thing is to have mono, 16bit,256 colors on the same line:

[global]
    footer = 'standout','','white,bold','dark blue','white,bold','#006'

It's hard to read + If you want to create a theme, you have to set all of those. maybe a file per format would be easier to work with ? e.g. sup_mono / sup_256 . Also do we support RGB ? almost all terminals do and it looks ok in urwid http://urwid.org/manual/displayattributes.html and then we can automate the generation of theme to work with https://github.com/dylanaraps/pywal

teto commented 2 years ago

hum I was looking at how to pass CI but I notice none of the current PRs pass CI: is that even doable ? I was hoping to run the checks locally too but this seems to be all SAAS ?