MyGit

toggle-corp/alacritty-colorscheme

Fork: 35 Star: 345 (更新于 2024-10-24 18:01:10)

license: Apache-2.0

Language: Python .

Change colorscheme of alacritty with ease.

最后发布版本: 1.0.0 ( 2021-02-07 12:04:05)

GitHub网址

Alacritty Colorscheme

PyPI PyPI - Downloads

Change colorscheme of alacritty with ease.

Usage

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].

Apache License, Version 2.0

最近版本更新:(数据更新于 2024-10-12 12:15:28)

2021-02-07 12:04:05 1.0.0

主题(topics):

alacritty, alacritty-colorscheme, base16, colorscheme, neovim, themes, vim, vimrc

toggle-corp/alacritty-colorscheme同语言 Python最近更新仓库

2024-11-06 03:34:16 home-assistant/core

2024-11-05 21:24:09 ai25395/FMatPix

2024-11-05 16:16:26 Guovin/TV

2024-11-05 15:03:24 Cinnamon/kotaemon

2024-11-04 23:11:11 DS4SD/docling

2024-11-04 10:56:18 open-compass/opencompass