diff --git a/.zshenv.example b/.zshenv.example deleted file mode 100644 index b2234bb..0000000 --- a/.zshenv.example +++ /dev/null @@ -1 +0,0 @@ -KITTY_REMOTE_CONTROL_PW= diff --git a/auto_theme.py b/auto_theme.py deleted file mode 100644 index 216ef5f..0000000 --- a/auto_theme.py +++ /dev/null @@ -1,66 +0,0 @@ -import os -import sys -import signal -import subprocess -import time -from pathlib import Path -from threading import Thread - - -def main(): - t = Thread(target=check_dark_mode) - t.start() - - -def check_dark_mode(): - while True: - try: - result = subprocess.run(["defaults", "read", "-g", "AppleInterfaceStyle"]) - - # the command above returns an error if the system is in light mode - # and returns "Dark" in dark mode - if result.returncode == 1: - enable_light_theme() - else: - enable_dark_theme() - - time.sleep(3) - except: - # the command above returns an error if the system is in light mode - # and returns "Dark" in dark mode - enable_light_theme() - - time.sleep(3) - - -def set_kitty_theme(theme: str): - kitty_light_theme_conf = Path.home() / "dotfiles" / "kitty" / f"{theme}.conf" - subprocess.run( - [ - "kitten", - "@", - "--password-env=KITTY_REMOTE_CONTROL_PW", - "set-colors", - "--all", - "--configured", - kitty_light_theme_conf.resolve().as_posix(), - ] - ) - - -def enable_light_theme(): - set_kitty_theme("Catppuccin-Latte") - - -def enable_dark_theme(): - set_kitty_theme("Catppuccin-Mocha") - - -if __name__ == "__main__": - - def signal_handler(sig, frame): - sys.exit(0) - - signal.signal(signal.SIGINT, signal_handler) - main() - signal.pause() diff --git a/startup.sh b/startup.sh deleted file mode 100755 index a8a52c9..0000000 --- a/startup.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/zsh -python ./auto_theme.py