The Kitty Theme Selector is a command-line tool written in Bash to choose and apply themes for the kitty terminal emulator. It provides a user-friendly interface for selecting themes from a collection and applying them to the kitty terminal.
- Features
- Prerequisites
- Installation
- Usage
- Options
- Themes Repository
- License
- Choose and apply themes for the kitty terminal emulator.
- Command-line argument support for specifying the themes directory and theme directory.
- Automatic cloning of the themes repository if no themes are found or the directory is empty.
- Theme preservation - Backup of the current theme is created before applying a new one.
- Signal handling for Ctrl+C to ensure graceful cleanup operations and theme restoration.
To use this script, you need the following:
- Bash: The script is written in Bash, so make sure you have a compatible Bash shell available.
- xdotool: This script uses xdotool to send keystrokes to the terminal for refreshing the kitty theme. Ensure that xdotool is installed and accessible in your system.
Clone the repository or download the script:
git clone https://github.com/Qubut/Kitty-Theme-Selector.git
cd Kitty-Theme-Selector
Make the script executable:
chmod +x kts.sh
Run the script with the following command:
./kts [options]
The script supports the following command-line options:
-h, --help: Display the help message.
-d, --themes-dir <dir>: Set the directory where kitty themes are stored. Default is: ~/.config/kitty/kitty-themes/.
-t, --theme-dir <dir>: Set the directory where the current kitty theme link is created.
Default is: ~/.config/kitty/kitty.conf -> ~/.config/kitty/kitty-themes/themes/Choosen_theme.conf.
By default, it clones themes from a predefined repository, if no themes are found.
If you want to use a different repository, modify the THEMES_REPO
variable in the env_vars file.
This script is licensed under the MIT License.