Change colorscheme of alacritty with ease
Project description
Alacritty Colorscheme
Change colorscheme of alacritty with ease.
Installation
You can install alacritty-colorscheme using pip:
pip install --user alacritty-colorscheme
Usage
usage: alacritty-colorscheme [-c configuration file] [-C colorscheme directory] [-V] [-h]
{list,status,toggle,apply} ...
Getting colorschemes
-
You can get colorschemes from aaron-williamson/base16-alacritty
REPO="https://github.com/aaron-williamson/base16-alacritty.git" DEST="$HOME/.aarors-williamson-colorschemes" # Get colorschemes git clone $REPO $DEST # Create symlink at default colors location (optional) ln -s "$DEST/colors" "$HOME/.config/alacritty/colors"
-
You can also get colorschemes from from eendroroy/alacritty-theme
REPO=https://github.com/eendroroy/alacritty-theme.git DEST="$HOME/.eendroroy-colorschemes" # Get colorschemes git clone $REPO $DEST # Create symlink at default colors location (optional) ln -s "$DEST/themes" "$HOME/.config/alacritty/colors"
Sync with vim/neo-vim
If you are using base16 colorschemes from
base16-vim plugin, you can use
the -V
argument to automatically generate ~/.vimrc_background
file when you
change alacritty colorscheme. You will need to source this file in your vimrc
to load the same colorscheme in vim.
Add this in your .vimrc
file:
if filereadable(expand("~/.vimrc_background"))
let base16colorspace=256 " Remove this line if not necessary
source ~/.vimrc_background
endif
When you change your alacritty colorscheme, you simply need to source
~/.vimrc_background
or your vimrc
.
If you are a neo-vim user, ~/.vimrc_background
will be automatically sourced.
Examples
bash/zsh aliases
Add this in your .zshrc
or .bashrc
file:
LIGHT_COLOR='base16-gruvbox-light-soft.yml'
DARK_COLOR='base16-gruvbox-dark-soft.yml'
alias day="alacritty-colorscheme -V apply $LIGHT_COLOR"
alias night="alacritty-colorscheme -V apply $DARK_COLOR"
alias toggle="alacritty-colorscheme -V toggle $LIGHT_COLOR $DARK_COLOR"
i3wm/sway bindings
Add this in your i3 config
file:
set $light_color base16-gruvbox-light-soft.yml
set $dark_color base16-gruvbox-dark-soft.yml
# Toggle between light and dark colorschemes
bindsym $mod+Shift+n exec alacritty-colorscheme -V toggle $light_color $dark_color
# Toggle between all available colorschemes
bindsym $mod+Shift+m exec alacritty-colorscheme -V toggle
# Get notification with current colorscheme
bindsym $mod+Shift+b exec notify-send "Alacritty Colorscheme" `alacritty-colorscheme status`
Development
Running locally
pip install --user poetry
git clone https://github.com/toggle-corp/alacritty-colorscheme.git
cd alacritty-colorscheme
poetry install
poetry run python -m alacritty_colorscheme.cli
Installing locally
pip install --user .
License
Content of this repository is released under the [Apache License, Version 2.0].
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file alacritty-colorscheme-1.0.0.tar.gz
.
File metadata
- Download URL: alacritty-colorscheme-1.0.0.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.10.11-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b4f9c95fb58edbef97452ba5a3fb9bfe989da4601beb0b025350cfc1acab22d |
|
MD5 | 6c0d61c182d053c7e5555fbf1dc4ce1c |
|
BLAKE2b-256 | fa64cc6d789c5859582467577079b8267c615c226aaa8ab2324e7ce970f5185a |
File details
Details for the file alacritty_colorscheme-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: alacritty_colorscheme-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.10.11-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f88a7b847543f68f857d939276074f3ea63c4cff43cf0ae499b362bf32778c1 |
|
MD5 | 169e918d8a5b52f1d052ca7901b3036b |
|
BLAKE2b-256 | ae3138b2c7d941d6050c3da7428832352896f1c3d71756a6015a6db1e4ef9866 |