catppuccin / catppuccin/squirrel

Share my .zshrc for Rime, make it easier to change theme

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
51
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Put all theme names in ```~/.rimetheme_args``` and then press Tab:

![image](https://github.com/moseeking/squirrel/assets/11457071/40b0d522-6d12-482e-836d-4d3e5c99c215)

``` shell
export RIME_DIR="$HOME/Library/Rime"
alias rime-install="bash $RIME_DIR/plum/rime-install"

theme_file="$RIME_DIR/squirrel.custom.yaml"
function rimetheme(){
theme=" style/color_scheme: $1 # 配色方案"
scheme_line=`awk '/color_scheme:/{print NR}' ${theme_file}`
gsed -i "${scheme_line}c\ ${theme}" ${theme_file}
echo "更新配色方案: $1"
Squirrel --reload
}

_rimetheme()
{
local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(grep "$cur" ~/.rimetheme_args) )
}
complete -F _rimetheme rimetheme

alias rt=rimetheme
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.