1. 背景
最近电脑置换后,需要重新初始化下 Mac M4 机器,尝试了两次 Mac 同步都失败了(因为 M1 的数据太大 600 多 G),索性花了一个周末时间倒腾了下新的电脑软件配置,简要备注下
2. 工具初始化
2.1. MAC 必备
2.2. Mac 效率工具
2.3. Mac 办公
软件名 | 软件说明 |
---|
iOA | ✅ |
WeCom | ✅ |
WeTerm | ✅ |
Office 套件 | ⭕️ |
腾讯会议 | ✅ |
| |
2.4. Mac 其他
f.lux | 调色 | ✅ |
---|
微信读书 | AppStore | ✅ |
微信 | \ | ✅ |
3. 软件配置
3.1. 前置网络、基础软件安装
brew 安装软件
1
2
3
| # brew安装软件
brew install autossh,autojump,go
...
|
基于 private_script 脚本配置网络:
lanuch autopac
配置restart_socks
配置
3.2. PopClip 配置
插件位置
目录位置:~/Library/Application Support/PopClip/Extensions

插件配置

1
2
3
4
5
6
7
8
9
10
11
12
13
| # Wisdom
- ApiHost: https://wisdom.sapaude.tech
- ApiKey: ***
# Notion Digest
- Integrations: ***
- PageId: ***
- FirstBlockId: ***
# Search URL
- SearchURL: https://www.google.com/search?q=***
# En\Zh翻译
|
3.3. Oh-my-zsh 配置
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| # 高亮
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
# 历史补全
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
# 配置
ZSH_THEME="atime"
# 插件
plugins=(
zsh-autosuggestions
zsh-syntax-highlighting
git
git-prompt
colorize
colored-man-pages
jump
pip
python
brew
docker
docker-compose
kubectl
)
|
3.4. 输入法 Shift 切换配置
输入法调整:基于坐
- Fn 取消功能(Icons),修改 Fn 为功能按键
- Keyboard 的预测(Show predictive completions)关闭
Karibiner 配置
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| {
"description": "Change L_Shift to right_command+right_option+f1 to switch EN/ZH",
"manipulators": [
{
"from": {
"key_code": "left_shift",
"modifiers": { "optional": ["any"] }
},
"to": [
{
"key_code": "left_shift",
"lazy": true
}
],
"to_if_alone": [
{
"key_code": "f1",
"modifiers": ["right_command", "right_option"]
}
],
"type": "basic"
}
]
}
|
修改 Karabiner 基础参数

3.5. autopac 设置
支持 mac 下自动设置 PAC,一些launchctl
常用命令
1
2
3
4
5
6
7
| 264 launchctl load ~/Library/LaunchAgents/com.tkstorm.autopac.plist
265 launchctl list | grep com.tkstorm.autopac
271 launchctl unload ~/Library/LaunchAgents/com.tkstorm.autopac.plist
1967 launchctl list | grep com.tkstorm.autopac
1968 launchctl stop com.tkstorm.autopac
1969 launchctl start com.tkstorm.autopac
3550* launchctl status
|
vim ~/Library/LaunchAgents/com.tkstorm.autopac.plist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| $ cat ~/Library/LaunchAgents/com.tkstorm.autopac.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.tkstorm.autopac</string>
<key>ProgramArguments</key>
<array>
<string>/private/data/projects/github.com/lupguo/private_scripts/mac/network/autopac/autopac.py</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
<key>StandardErrorPath</key>
<string>/tmp/autopac.err</string>
<key>StandardOutPath</key>
<string>/tmp/autopac.out</string>
</dict>
</plist>
|
3.6. HammerSpoon 配置
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| local function openApp(appName)
local app = hs.application.get(appName)
if not app then
hs.application.launchOrFocus(appName)
else
app:activate()
end
end
-- alt+ a - z
hs.hotkey.bind({'alt'}, 'r', function() openApp("Chatwise") end)
hs.hotkey.bind({'alt'}, 'b', function() openApp("Notion") end)
hs.hotkey.bind({'alt'}, 'f', function() openApp("Google Chrome") end)
-- f1 - f12
hs.hotkey.bind({'alt'}, 'f1', function() openApp("iTerm") end)
|
4. Mac 软件 - 付费&免费软件
