Open ppambler opened 3 years ago
我找到一份不错的 Bash 外观配置:xnng/my-git-bash: my git bash config
根据它的操作,我得一下备份 git-prompt.sh
:
if test -f /etc/profile.d/git-sdk.sh
then
TITLEPREFIX=SDK-${MSYSTEM#MINGW}
else
TITLEPREFIX=$MSYSTEM
fi
if test -f ~/.config/git/git-prompt.sh
then
. ~/.config/git/git-prompt.sh
else
PS1='\[\033]0;$TITLEPREFIX:$PWD\007\]' # set window title
PS1="$PS1"'\n' # new line
# PS1="$PS1"'\[\033[32m\]' # change to green
PS1="$PS1"'\[\033[1;33m\]' # change to green
# PS1="$PS1"'\u@\h ' # user@host<space>
PS1="$PS1"'Ambler ' # user@host<space>
# PS1="$PS1"'\[\033[35m\]' # change to purple
# PS1="$PS1"'$MSYSTEM ' # show MSYSTEM
PS1="$PS1"'\[\033[1;33m\]' # change to purple
PS1="$PS1"'\t ' # show MSYSTEM
PS1="$PS1"'\[\033[1;33m\]' # change to brownish yellow
# PS1="$PS1"'\w' # current working directory
PS1="$PS1"'\W' # current working directory
if test -z "$WINELOADERNOEXEC"
then
GIT_EXEC_PATH="$(git --exec-path 2>/dev/null)"
COMPLETION_PATH="${GIT_EXEC_PATH%/libexec/git-core}"
COMPLETION_PATH="${COMPLETION_PATH%/lib/git-core}"
COMPLETION_PATH="$COMPLETION_PATH/share/git/completion"
if test -f "$COMPLETION_PATH/git-prompt.sh"
then
. "$COMPLETION_PATH/git-completion.bash"
. "$COMPLETION_PATH/git-prompt.sh"
PS1="$PS1"'\[\033[36m\]' # change color to cyan
PS1="$PS1"'`__git_ps1`' # bash function
fi
fi
PS1="$PS1"'\[\033[0m\]' # change color
PS1="$PS1"'\n' # new line
PS1="$PS1"'$ ' # prompt: always $
fi
MSYS2_PS1="$PS1" # for detection by MSYS2 SDK's bash.basrc
# Evaluate all user-specific Bash completion scripts (if any)
if test -z "$WINELOADERNOEXEC"
then
for c in "$HOME"/bash_completion.d/*.bash
do
# Handle absence of any scripts (or the folder) gracefully
test ! -f "$c" ||
. "$c"
done
fi
以及 .minttyrc
:
Font=Consolas
FontHeight=14
ForegroundColour=248,248,242
BackgroundColour=40,42,54
CursorColour=133,153,0
Black=0,0,0
BoldRed=255,110,103
Green=80,250,123
BoldGreen=90,247,142
BoldBlack=104,104,104
Yellow=241,250,140
BoldYellow=244,249,157
Blue=202,169,250
BoldBlue=202,169,250
Magenta=255,121,198
BoldMagenta=255,146,208
Cyan=139,233,253
BoldCyan=154,237,254
White=191,191,191
BoldWhite=230,230,230
BoldAsFont=-1
FontSmoothing=full
FontWeight=700
FontIsBold=yes
Locale=zh_CN
Charset=UTF-8
ThemeFile=windows10
Transparency=low
写 markdown 的字体(选择中文好看的字体):Sarasa Mono SC
(英文名,配到 VS Code里边去),其中文名是 等距更纱黑体 SC
下载(下 ttf
格式的):
从下载得到的压缩包里边,解压这 10 个 sc
的 ttf
文件:
本地写 markdown 的测试效果:
当然,你也可以下载 Inziu Iosevka
这个字体:codeface/cjk-fonts/inziu-iosevka-SC at master · chrissimpkins/codeface
搜狗输入法的字体:方正粗圆简体
写代码的字体:JetBrains Mono
浏览器自定义字体:
关于 StarUML 3.2.2
这个软件在 win10 里边的破解方法:
node
npm install asar -g
StarUML Setup 3.2.2.exe
,没有自定义目录给你安装,它默认会安装在 C:\Program Files\StarUML
这里C:\Program Files\StarUML\resources
这个目录 -> 运行 asar extract app.asar app
app
目录,修改它旗下的 /app/src/engine/license-manager.js
这个 js
文件app
目录 -> 在resources
目录下, asar pack app app.asar
修改 license-manager.js
这个文件的姿势:
➹:StarUML 3.2.2 的破解方法 for Windows 10 | Java干货铺子【公众号:路人甲Java】
有时候我们并咩有听清楚这 5s 时间内讲了什么,于是我们回退一下,但这一回退却是 10s 前的内容,而我们想要的是刚刚听到的那一句话的内容,所以可有:
PotPlayer 设置左右快进的时间(默认是 10 s):
Snipaste:
Chrome浏览器的快捷键 与 Snipaste 默认绑定的 F1 冲突了,原先,我聚焦到某个网页,按下 F1 是可以直接截图的,可现在不行了,直接打开了「浏览器的帮助页」
如何回到原先的那种操作?
必须设置为开机自启动才能勾选「以管理身份」……
➹:有没有哪位大神有屏蔽chrome浏览器所有快捷键的插件? - 知乎
➹:Windows 自动化效率神器:AutoHotkey 使用教程和脚本推荐 - 知乎
➹:1.1第一个Autohotkey程序-快捷键打开(www.autoahk.com)网址-AutoAHK编辑器教程(新建脚本、运行脚本) - AutoAHK
➹:让你在 Windows 上也能实现高效操作:AutoHotkey - 少数派
Git
安装
我下了便携版的Git,但不太好用(应该是不怎么熟悉),于是我从新下载了个
.exe
这个
2.29.2
版的,在安装的时候,多了一些勾选,如现在git init
的仓库不再是master
分支了,而是main
外观配置
一些配置
让本地的 Git 与 GitHub 关联,也就是搞个远程仓库
在
~
目录下:一直回车操作,直到结束
得到公钥内容:
登录 GitHub -> 点头像,选择「Settings」-> 切换到 「SSH and GPG Keys」-> 「new SSH Key」-> 输入你这台电脑的名字 + 把之前拷贝的公钥内容,粘进去
测试是否关联了?
得到这样的提示:
The authenticity of host 'github.com (52.74.223.119)' can't be established.……
,输入yes
,给了你这样Hi ppambler! You've successfully authenticated, but GitHub does not provide shell access.
一个回应 -> 表明关联成功用 Proxifier + Shadowsocks 让 git clone 走小飞机代理(满速下载)
下载安装包:【Proxifier下载】2020年最新官方正式版Proxifier免费下载 - 腾讯软件中心官网
如果需要注册,那就注册吧,然而并不需要注册:
配置 Proxifier:
配置第一个图标:
配置第二个图标:
再修改 Bash 外观
用的是
dracula
样式修改命令行开头的字符
打开这个目录
D:\Git\etc\profile.d
,也就是你 Git 安装的目录 -> 用编辑器打开这个git-prompt.sh
文件,修改它:修改完之后的效果:
以上的外观样式并不好看,于是我用了 https://github.com/xnng/my-git-bash 的配置: