-
-
Notifications
You must be signed in to change notification settings - Fork 969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
light/dark theme based on system? #4915
Comments
Not something I care enough to implement. It's trivially easy to |
How didn't I think of that?! Looking around it seems https://github.com/bouk/dark-mode-notify for osx is a kickstart I'll be trying out, if anyone stumbles upon something different/better let me know. EDIT: #!/bin/bash
if [[ "$DARKMODE" -eq 1 ]]; then
kitty +kitten themes --reload-in=all Snazzy
fi
if [[ "$DARKMODE" -eq 0 ]]; then
kitty +kitten themes --reload-in=all Material
fi does it :) |
@hanoii Did you manage to figure out a solution? The slightly annoying thing with this approach is all the separate moving parts to it. |
@Joxtacy yes, it was sorted out by what explained in the other post. I don't have to |
Hi @hanoii, I was able to build and test dark-mode-notify with Kitty from command line, but for some reason I'm unable to get the Background Agent <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>ke.bou.dark-mode-notify</string>
<key>KeepAlive</key>
<true/>
<key>StandardErrorPath</key>
<string>/tmp/dark-mode-notify-stderr.log</string>
<key>StandardOutPath</key>
<string>/tmp/dark-mode-notify-stdout.log</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/dark-mode-notify</string>
<string>/Users/user/.config/kitty/system_based_theme.zsh</string>
</array>
</dict>
</plist> EDIT: #!/bin/zsh
if [[ "$DARKMODE" -eq 0 ]]; then
/Applications/kitty.app/Contents/MacOS/kitty +kitten themes --reload-in=all Rosé Pine Dawn
fi
if [[ "$DARKMODE" -eq 1 ]]; then
/Applications/kitty.app/Contents/MacOS/kitty +kitten themes --reload-in=all Rosé Pine Moon
fi Figured it out thanks to the error logs (which I was not using previously) |
For people using Gnome, I made a script that does it: https://github.com/gaheldev/kitty-gnome-lightdark-mode-switcher |
I case anyone is interested: I made a script that lets you generate your own color-schemes (for Kitty, Vim, and other programs) that allow you to reload the colors entirely dynamically, i.e. the entire scrollback is adjusted and you never have to worry about reloading anything but kitty! The repo also includes instructions for how to make Kitty automatically change the theme in sync with the macOS system dark/light mode. See Chameleon. |
Toggle Theme.zip |
Curiously Kitty is already tracking changes to the system theme but all it does is print the string "system color theme changed: dark/light". |
Nothing curious about it, the tracking is used to change the window decoration colors on GNOME Wayland. And see kovidgoyal/kitty-fosshack2024#3 |
Is your feature request related to a problem? Please describe.
I normally use a dark setting systemwide, but also sometimes I am outdoors and prefer a light theme for most and I would like a light one on kitty.
Describe the solution you'd like
I'd like a setting to set a default theme, a light theme and and or a dark theme. You could have a setting to enable this but I assume it's redundant, if you only select a default theme, there would be no change, if there's a light/dark theme configured, it will favour that over the default depending on the system setting.
The text was updated successfully, but these errors were encountered: