Created
March 7, 2023 09:04
-
-
Save romac/d90546e33d71574bb55d3ebd6a798bc3 to your computer and use it in GitHub Desktop.
Set kitty theme based on system mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kitty_reload() { | |
DARK_MODE="$(dark-mode status)" | |
# check if kitty is active | |
if [[ -n "$KITTY_PID" ]]; then | |
# set dark theme | |
if [[ "$DARK_MODE" == "on" ]]; then | |
kitty @ set-colors --all --configured "$HOME/.config/kitty/theme-dark.conf" | |
else | |
kitty @ set-colors --all --configured "$HOME/.config/kitty/theme-light.conf" | |
fi | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment