Crates.io | alacritty-theme-switcher |
lib.rs | alacritty-theme-switcher |
version | 0.1.5 |
source | src |
created_at | 2024-05-03 05:22:22.257795 |
updated_at | 2024-10-28 14:34:45.837394 |
description | Easily switch between color themes for Alacritty |
homepage | |
repository | https://github.com/spacebird-dev/alacritty-theme-switcher |
max_upload_size | |
id | 1228386 |
size | 61,927 |
A simple tool to quickly switch between different themes for alacritty, with shell completion!
From the Alacritty website
Alacritty is a modern terminal emulator that comes with sensible defaults, but allows for extensive configuration. By integrating with other applications, rather than reimplementing their functionality, it manages to provide a flexible set of features with high performance.
By default, Alacritty does not have support for applying different themes, color configuration is instead set in the config file.
The alacritty-theme
provides such theme configurations, but changing the theme has to be done manually in alacritty.toml
.
This tool emulates theme support for Alacritty by managing the theme configuration import in using Alacritty's configuration:
# in ~/.config/alacritty/themes/themes/my-theme.toml
[colors.primary]
background = '#282c34'
foreground = '#abb2bf'
[colors.normal]
black = '#1e2127'
red = '#e06c75'
green = '#98c379'
#...
# in ~/.config/alacritty/alacritty.toml
import = [
"~/.config/alacritty/themes/themes/my-theme-name.toml" # 👈 this line is added and managed by alacritty-theme-switcher
]
You can get the most recent release over on the Releases section.
The downloaded archive (either .zip or
.tar.gz
) contains both the binary and shell completion scripts:
/usr/local/bin
or ~/.local/bin
/usr/local/share/bash-completions/completions/
/usr/local/share/zsh/site-functions/
If you have cargo
installed, you can install this tool from crates.io
:
cargo install --locked alacritty-theme-switcher
Note that you will have to install the shell completion scripts manually, see above.
There is an AUR package available: alacritty-theme-switcher
Clone this repository, then run make build && sudo make install
to compile and install the utility.
First, put some theme files into your theme directory ($XDG_CONFIG/alacritty/themes/themes
by default).
Now you can switch themes by running alacritty-theme-switcher <theme-name>
.
You can also list available themes with alacritty-theme-switcher -l
.
Created by @maxhoesel
Licensed under the GPL 3 (see the LICENSE file)