Last active
September 15, 2024 19:10
-
-
Save ianfabs/0877bd6de3b34c3fae5fbaceb073fc93 to your computer and use it in GitHub Desktop.
Kittens for kitty-themes!
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
kitten_alias ~/.config/kitty/try-theme.py try-theme | |
kitten_alias ~/.config/kitty/set-theme.py set-theme |
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
#!/usr/bin/env python3 | |
# vim:fileencoding=utf-8 | |
# License: GPL v3 Copyright: 2017, Kovid Goyal <kovid at kovidgoyal.net> | |
import sys | |
import subprocess | |
from typing import List | |
def main(args: List[str] = sys.argv): | |
theme = args[1] | |
if not theme: | |
theme = input("Theme: ") | |
theme = theme.replace(' ', '_') | |
command = 'ln -sf /home/ian/.config/kitty/kitty-themes/themes/{}.conf /home/ian/.config/kitty/theme.conf'.format(theme) | |
subprocess.run(command.split(' ')) | |
pass |
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
#!/usr/bin/env python3 | |
# vim:fileencoding=utf-8 | |
# License: GPL v3 Copyright: 2017, Kovid Goyal <kovid at kovidgoyal.net> | |
from sys import argv | |
from subprocess import run | |
from typing import List | |
def main(args: List[str] = argv): | |
theme = args[1] | |
if not theme: | |
theme = input("Theme: ") | |
theme = theme.replace(' ', '_') | |
command = 'kitty @ set-colors -a /home/ian/.config/kitty/kitty-themes/themes/{}.conf'.format(theme) | |
run(command.split(' ')) | |
pass |
Command to change the current theme in kitty (Change THEME='' to the name of the theme file you want to try):
THEME='';kitty @ set-colors -a "~/.config/kitty/kitty-themes/themes/$THEME.conf"
To show the colors for the current theme (sudo apt install jq if missing):
COLOR_SCRIPT_REPO=https://api.github.com/repos/stark/Color-Scripts/contents/color-scripts;wget -q -O - $(curl -s $COLOR_SCRIPT_REPO | jq '.[] | "\(.path) \(.download_url)"' -r | shuf -n1 | cut -d " " -f2) | bash
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Kitty themes repository: