kovidgoyal / kitty-fosshack2024

Projects for FOSSHack 2024
GNU General Public License v3.0
9 stars 5 forks source link

Implement automatic color scheme changing between light and dark #3

Open kovidgoyal opened 3 months ago

kovidgoyal commented 3 months ago

Allow specifying color themes for light and dark mode and switch automatically between them based on system color theme state.

Will require a new option in kitty.conf, something like

light_and_dark_mode_themes theme name 1, theme name 2

Integration points:

Boss.on_system_color_scheme_change Boss.patch_colors

Get a named theme as a .conf file by running kitten themes --dump-theme --check-age=-1 Theme Name

Then parse that into a color dict to call patch_colors with. See rc/set_colors.py for an example of doing that.

When calling the kitten handle the theme not being downloaded by recalling with --cache-age=0

Also use an IPC mutex so that if there are multiple kitty's running they dont all call the kitten at the same time.

Pure python unless some changes to the themes kittne need to be made, which would be in Go.

KishanJainSP commented 1 month ago

Hey @kovidgoyal Our team would like work upon this issue under FOSS Hack 2024 please assign this issue to us

kovidgoyal commented 1 month ago

Done.