轻松改变活泼的配色方案
alacritty-colorscheme的Python项目详细描述
活泼的配色方案
轻松改变活泼的配色方案。在
使用
usage: alacritty-colorscheme [-h] (-s | -l | -a colorscheme | -t colorschemes [colorschemes ...] | -T) [-r] [-c configuration file] [-C colorscheme directory] [-V]
Change colorscheme of alacritty with ease.
optional arguments:
-h, --help show this help message and exit
-s, --show-applied Show applied colorscheme
-l, --list-available List available colorschemes
-a colorscheme, --apply colorscheme
Apply colorscheme
-t colorschemes [colorschemes ...], --toggle colorschemes [colorschemes ...]
Toggle colorschemes
-T, --toggle-available
Toggle all available colorschemes
-r, --reverse-toggle Toggle through colorschemes in reverse order
-c configuration file, --config-file configuration file
Path to configuration file
-C colorscheme directory, --colorscheme-directory colorscheme directory
Path to colorscheme directory
-V, --base16-vim Support base16-vim
安装
您可以从pip安装:
^{pr2}$在本地运行
# Install poetry pip install --user poetry # Get program git clone https://github.com/toggle-corp/alacritty-colorscheme.git # Run programcd alacritty-colorscheme poetry install poetry run python alacritty_colorscheme/cli.py
获取主题
您可以从aaron-williamson/base16-alacritty获取主题
DEST="$HOME/.aaron-williamson-alacritty-theme"# Get themes git clone https://github.com/aaron-williamson/base16-alacritty.git $DEST
您也可以从eendroroy/alacritty-theme获取主题
DEST="$HOME/.eendroroy-alacritty-theme"# Get themes git clone https://github.com/eendroroy/alacritty-theme.git $DEST
与vim/neovim同步
如果使用的是来自
base16-vim,可以使用-V
参数以在更改敏捷性时生成~/.vimrc_background
文件
配色方案。在
您需要在您的vimrc中源文件来加载适当的 vim中的配色方案。在vimrc文件中添加以下内容:
if filereadable(expand("~/.vimrc_background"))let base16colorspace=256" Remove this line if not necessary source ~/.vimrc_background endif
在更改了alacritty colorscheme之后,只需重新加载vimrc 配置。在
重新加载neovim
如果您正在使用neovim,您可以使用 neovim-remote重新加载nvim 外部会议。在
安装neovim遥控:
pip install --user neovim-remote
使用以下方法重新加载neovim会话:
nvr -cc "source ~/.config/nvim/init.vim"
bash/zsh配置示例(base16 vim+neovim+neovim remote)
您可以在.zshrc或.bashrc中添加此示例配置以切换
在黑暗和光明之间的主题。
这个代码段创建了两个别名:day
,night
function reload_nvim {for SERVER in $(nvr --serverlist);do nvr -cc "source ~/.config/nvim/init.vim" --servername $SERVER&done}COLOR_DIR="$HOME/.aaron-williamson-alacritty-theme/colors"LIGHT_COLOR='base16-gruvbox-light-soft.yml'DARK_COLOR='base16-gruvbox-dark-soft.yml'aliasday="alacritty-colorscheme -C $COLOR_DIR -a $LIGHT_COLOR -V && reload_nvim"aliasnight="alacritty-colorscheme -C $COLOR_DIR -a $DARK_COLOR -V && reload_nvim"
示例i3wm/摇摆配置
set$color_dir$HOME/.aaron-williamson-alacritty-theme/colors set$light_color base16-gruvbox-light-soft.yml set$dark_color base16-gruvbox-dark-soft.yml # Toggle between light and dark colorscheme bindsym $mod+Shift+n exec alacritty-colorscheme -C $color_dir -t $light_color$dark_color# Toggle between all available colorscheme bindsym $mod+Shift+m exec alacritty-colorscheme -C $color_dir -T # Get notification with current colorscheme bindsym $mod+Shift+b exec notify-send "Alacritty Colorscheme"`alacritty-colorscheme -C $color_dir -s`
许可证
此存储库的内容是在[Apache许可证,版本2.0]下发布的。在
- 项目
标签: