什么软件才能让你的 macOS 更好用?
目录
动机
起因是我重置了系统,然后发现过去的习惯都要重新来一遍,于是为什么不写一篇文章呢?
brew install --cask microsoft-edge calibre sogouinput mos snipaste iina iterm2 rectangle
这里先给出一份 CheckList:
软件
- clash for windows
- homebrew
- microsoft onenote & outlook & edge
- wechat & qq
- sogouinput、微信输入法
- Desktop Pets:App Store 上的有趣软件,养一个电子宠物吧
- notion:必备写作软件
- 阿里云盘:不限速云盘
- calibre:电子书管理器
- mos: 鼠标与触控板方向不一致的解决方案
- snipaste:截图贴图
- iina:超好用的播放器,配合网络上资源站的视频地址,完全不会发热
- iterm2:可以透明背景、图片背景的终端
- Lens:管理 k8s 神器
- Rectangle:向 windows 一样排布窗口
- Paragon NTFS for Mac:希捷官网下载是免费的 软件和固件下载 | Support Seagate US
- 系统设置:键盘快捷键、触发角、默认网页浏览器、调度中心使窗口按应用程序成组
- ActivityWatch:时间追踪工具
浏览器插件
- 简悦:纯净阅读
- Adblock plus:屏蔽广告
- Dark Reader:暗黑模式
- Menu fish:古诗词标签页
- Relingo:英语生词自动标记
- Wayback Machine:网站记录备份
- Stylus:重新编辑网站 CSS 样式
- Wappalyzer:网站使用了哪些技术栈
- Web Clipper(配合语雀):剪藏
- FireShot:截屏
- 篡改猴(浏览器同步脚本)
- Microsoft编辑器:检查拼写和语法
命令行
- oh-my-zsh:一定要用 zsh
- Roboto Mono for powerline 字体:在 iterm2 中设置
- zsh 插件
- zsh-syntax-highlighting
- zsh-autosuggestions
- spaceship-ember
- spaceship-vi-mode
- autojump:
j
- neovim:
nvim
开发
- TabNine:GitHub Copilot 平替
- visual-studio-code:开发必备
主旨
ZSH 配置
Spaceship 安装与配置
https://github.com/spaceship-prompt/spaceship-prompt
git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
Set ZSH_THEME="spaceship"
in your .zshrc
Introduction - Spaceship (spaceship-prompt.sh) 配置文件:
touch ~/.spaceshiprc.zsh
# Display time
SPACESHIP_TIME_SHOW=true
# Display username always
SPACESHIP_USER_SHOW=always
# Do not truncate path in repos
SPACESHIP_DIR_TRUNC_REPO=true
# Add custom Ember section
# See: https://github.com/spaceship-prompt/spaceship-ember
spaceship add ember
# Add a custom vi-mode section to the prompt
# See: https://github.com/spaceship-prompt/spaceship-vi-mode
spaceship add --before char vi_mode
看到这里,需要继续安装一些东西:
git clone https://github.com/spaceship-prompt/spaceship-ember.git $ZSH_CUSTOM/plugins/spaceship-ember
git clone https://github.com/spaceship-prompt/spaceship-vi-mode.git $ZSH_CUSTOM/plugins/spaceship-vi-mode
在 zsh 的插件中:plugins=($plugins spaceship-ember)
plugins=($plugins spaceship-vi-mode)
命令高亮插件
https://github.com/zsh-users/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
plugins=( [plugins...] zsh-syntax-highlighting)
命令补全插件
https://github.com/zsh-users/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
plugins=(
# other plugins...
zsh-autosuggestions
)
代理开关
pon() {
export http_proxy=socks5://127.0.0.1:7890
export https_proxy=socks5://127.0.0.1:7890
echo "proxy: on"
}
poff() {
unset http_proxy
unset https_proxy
echo "proxy: off"
}
放到 .zshrc
中就可以通过 pon
和 poff
命令来控制终端代理开关了。
自动跳转
cd
命令的更好替代 j
brew install autojump
Add the following line to your ~/.bash_profile or ~/.zshrc file:
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
开发环境
Jenkins
macOS Installers for Jenkins LTS
brew install jenkins-lts
brew upgrade jenkins-lts
brew services start jenkins-lts
brew services restart jenkins-lts
After starting the Jenkins service, browse to http://localhost:8080 and follow the instructions to complete the installation.
To start jenkins-lts now and restart at login:
brew services start jenkins-lts
Or, if you don’t want/need a background service you can just run:/usr/local/opt/openjdk@17/bin/java -Dmail.smtp.starttls.enable=true -jar /usr/local/opt/jenkins-lts/libexec/jenkins.war --httpListenAddress=127.0.0.1 --httpPort=8080
改写 service 文件就可以改掉端口号:
[Unit]
Description=Homebrew generated unit for jenkins-lts
[Install]
WantedBy=default.target
[Service]
Type=simple
ExecStart=/usr/local/opt/openjdk@17/bin/java -Dmail.smtp.starttls.enable=true -j
ar /usr/local/opt/jenkins-lts/libexec/jenkins.war --httpListenAddress=0.0.0.0
--httpPort=8101
但是 macOS,用的是 plist:
cat homebrew.mxcl.jenkins-lts.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>homebrew.mxcl.jenkins-lts</string>
<key>LimitLoadToSessionType</key>
<array>
<string>Aqua</string>
<string>Background</string>
<string>LoginWindow</string>
<string>StandardIO</string>
<string>System</string>
</array>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/openjdk@17/bin/java</string>
<string>-Dmail.smtp.starttls.enable=true</string>
<string>-jar</string>
<string>/usr/local/opt/jenkins-lts/libexec/jenkins.war</string>
<string>--httpListenAddress=0.0.0.0</string>
<string>--httpPort=8101</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
microk8s
Install MicroK8s on macOS | Ubuntu
brew install ubuntu/microk8s/microk8s
microk8s install
microk8s status --wait-ready
microk8s kubectl get nodes
microk8s kubectl get services
microk8s enable dns
microk8s stop
microk8s start