Skip to content

Instantly share code, notes, and snippets.

@ianfabs
Last active April 21, 2021 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ianfabs/0877bd6de3b34c3fae5fbaceb073fc93 to your computer and use it in GitHub Desktop.
Save ianfabs/0877bd6de3b34c3fae5fbaceb073fc93 to your computer and use it in GitHub Desktop.
Kittens for kitty-themes!
kitten_alias ~/.config/kitty/try-theme.py try-theme
kitten_alias ~/.config/kitty/set-theme.py set-theme
#!/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
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment