1 Star 0 Fork 0

Aben/CascadiaForPowerline

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
install.sh 2.66 KB
一键复制 编辑 原始数据 按行查看 历史
Aben 提交于 2021-12-03 16:11 . fix(install): add windows download commit
# shellcheck shell=sh disable=SC3043
_REMOTE="${_REMOTE:-github}"
_G_USER="${_G_USER:-zhengqbbb}"
____font_install_run() {
if [ -z "$(command -v git)" ];then
printf "\033[0;31m[qb]: Error git is not installed\033[0m\n"
return 1
fi
local _font_dir
local _source_path
_source_path="$( pwd )"
env git clone "https://${_REMOTE}.com/${_G_USER}/CascadiaForPowerline.git" "$_source_path/CascadiaForPowerline" || {
printf "\033[0;31m[qb]: Error git clone of CascadiaForPowerline repo failed\033[0m\n"
return 1
}
if test "$(uname)" = "Darwin" ; then
# MacOS
_font_dir="$HOME/Library/Fonts"
else
# Linux
_font_dir="$HOME/.local/share/fonts"
mkdir -p "$_font_dir"
fi
cp "$_source_path/CascadiaForPowerline/CascadiaCodePL.ttf" "$_font_dir/"
if which fc-cache >/dev/null 2>&1 ; then
printf "\033[1;33m[qb]: Resetting font cache, this may take a moment...\033[0m\n"
fc-cache -f "$_font_dir"
fi
printf "\033[1;32m[qb]: Cascadia Code PL installed to \033[4;33m$_font_dir\033[0m\n"
____font_printf_settings
}
____font_printf_settings() {
printf "\n\033[1;32m%s\033[0m\n" "---- Now you need to manually set the terminal font ----"
printf "\033[1;33m%s \033[32m%s \033[4;33m%s\033[0m \033[1;32m%s\033[0m\n\n" \
"Windows(Need to install manually):" \
"open folder to find CascadiaCodePL.ttf:" \
"$_source_path/CascadiaForPowerline" \
"Use the right click, Choose installation"
printf "\033[1;33m%s \033[32m%s\033[1;36m %s\033[0m\n" \
"Windows Terminal:" \
"Open settings,Find the default value in the right column, select the appearance, and then select the font" \
"\"Cascadia Code PL\""
printf "\033[1;33m%s \033[32m%s\033[1;36m %s\033[0m\n" \
"Mac Terminal:" \
"Use \`command + ,\` And then find font, Choose:" \
"\"Cascadia Code PL\""
printf "\033[1;33m%s \033[32m%s\033[1;36m %s\033[0m\n" \
"Ubuntu Terminal:" \
"Use mouse right click to open the setting(P), Find text, And then choose:" \
"\"Cascadia Code PL\""
printf "\033[1;33m%s \033[32m%s\033[1;36m %s\033[0m\n" \
"VSCode:" \
"Editor \`setting.json\` add json item" \
"\"terminal.integrated.fontFamily\": \"Cascadia Code PL\""
printf "\033[1;33m%s \033[32m%s\033[1;36m %s\033[0m\n" \
"iTerm2:" \
"Use \`command + ,\` Find Profiles - Text - Font, And then choose:" \
"\"Cascadia Code PL\""
printf "\n\033[1;36m%s\033[4;33m %s\033[0m\n" \
"More settings:"\
"https://github.com/Zhengqbbb/MonacoForPowerline/issues/1"
}
____font_install_run
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/AAAben/CascadiaForPowerline.git
git@gitee.com:AAAben/CascadiaForPowerline.git
AAAben
CascadiaForPowerline
CascadiaForPowerline
main

搜索帮助