美化自己最常用用的是p10k,oh-my-zsh的一个主题。
#安装zsh,git
apt install git nano zsh
#拉取代理
git clone https://github.com/ohmyzsh/ohmyzsh.git
mv ohmyzsh .oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
#修改主题,及解决一些乱七八糟的bug。
cat >>~/.zshrc <<-'EOF'
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
}
pastefinish() {
zle -N self-insert $OLD_SELF_INSERT
}
zstyle :bracketed-paste-magic paste-init pasteinit
zstyle :bracketed-paste-magic paste-finish pastefinish
EOF
#修改主题,修改代码高亮
sed -i "s/ZSH_THEME=\".*\"/ZSH_THEME=\"powerlevel10k\/powerlevel10k\"/" ~/.zshrc
sed -i "s/^plugins=(*/&extract zsh-syntax-highlighting /g" ~/.zshrc
#切换到zsh
chsh -s zsh
安装termux.styling,解决p10k一些图标乱码的问题。
https://f-droid.org/zh_Hans/packages/com.termux.styling/
上一篇:
termux文件目录结构,文件管理下一篇:
在termux里自己最常用的几个命令行工具