-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
316 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
--- | ||
title: "Ultimate macOS Setup" | ||
date: 2024-10-17T17:08:59+08:00 | ||
tags: ["macOS", "Configuration"] | ||
--- | ||
|
||
{{< lead >}} | ||
Rational configuration and efficient functional software, creating a smooth and efficient workflow. | ||
{{< /lead >}} | ||
|
||
> The content will be explained in the order of the configuration. Some parts can be selectively configured according to individual needs. | ||
{{< alert cardColor="#e63946" iconColor="#1d3557" textColor="#f1faee" >}} It is recommended to read through the entire text first, and not to rush into the configuration. The in-depth configuration of some applications may depend on other applications, so it is absolutely crucial not to implement everything at once! {{< /alert >}} | ||
|
||
## Prerequisites | ||
|
||
### VPN (Optional) | ||
|
||
The majority of computer-related applications are difficult to access in mainland China. If users in mainland China want to comfortably configure these applications, they must complete this step. | ||
|
||
### Command Line Tools (CLT) for Xcode | ||
|
||
For macOS users, the system comes with `bash`, `git`, and `curl` pre-installed. In the command line, enter `xcode-select --install` to install `CLT for Xcode`. | ||
|
||
### Homebrew | ||
|
||
> The most important application on macOS is Homebrew. Please learn the detailed usage methods of `Homebrew` | ||
[Homebrew](https://brew.sh/) is the most widely used and best package manager on macOS. Basically, all "small" applications (except for large and robust ones like Chrome) are recommended to be downloaded and managed using the package manager. | ||
|
||
For users in mainland China, it is recommended to install and configure Homebrew according to the [Tsinghua University Open Source Software Mirror Site](https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/). It's best to directly **switch the source**. | ||
|
||
If mainland China users have a `VPN`, they can also directly install Homebrew using the terminal commands on the Homebrew official website. | ||
|
||
### GitHub (Recommended) | ||
|
||
Recommended: Register and configure a `GitHub` account with SSH protocol connection. | ||
|
||
## Basic Applications | ||
|
||
### Zsh | ||
|
||
1. First, use `brew` to install `zsh` and set it as the default `shell`. | ||
```shell | ||
brew install zsh | ||
chsh -s $(which zsh) | ||
``` | ||
2. I use `Oh My Zsh` as a framework and package manager for managing the use of `zsh`, and install it according to the [official website](https://ohmyz.sh/#install) command line instructions. | ||
3. The `Oh My Zsh` plugin system is very rich, and you can refer to my [`.zshrc`](https://github.com/hza2002/dotfiles/blob/main/zsh/.zshrc) for recommended plugins to install or enable. Please make sure you understand the meaning of each line in the configuration file before adding it. | ||
4. Tools such as [`Starship`](https://starship.rs/) can be used to enhance the `prompt`, and you can refer to my [configuration file](https://github.com/hza2002/dotfiles/blob/main/zsh/.config/starship.toml). | ||
|
||
### Node.js | ||
|
||
Recommend using [`fnm`](https://github.com/Schniz/fnm) for managing multiple `Node.js` environments. Install it using `brew` and follow the configuration instructions on its official website. | ||
|
||
### Java | ||
|
||
Recommend using [`jenv`](https://github.com/jenv/jenv) for managing multiple `Java` environments. Install it using `brew` and configure it according to the official website. | ||
|
||
### Conda | ||
|
||
Recommend installing `Miniconda`, which is more lightweight. You can install it according to the [official documentation](https://docs.anaconda.com/miniconda/). | ||
|
||
### Rust | ||
|
||
According to the [official website](https://www.rust-lang.org/learn/get-started), you can install Rust using the command line. | ||
|
||
### Golang | ||
|
||
According to the [official website](https://go.dev/dl/), you can install it using the command line. | ||
|
||
## Productivity tools | ||
|
||
### Karabiner-Elements | ||
|
||
> A powerful and stable keyboard customizer | ||
Recommend downloading from the [official website](https://karabiner-elements.pqrs.org/), it has powerful functions and provides a high degree of customization for both keyboard and mouse. | ||
|
||
### iTerm2 | ||
|
||
> `iTerm2` is a terminal emulator, a replacement for `Terminal` and the successor to `iTerm`. It not only has a better appearance but also stronger functionality. Recommended configuration of hotkeys and themes. | ||
Recommended to use `brew` for installation, or you can also download and install it from the [official website](https://iterm2.com/). | ||
|
||
### NeoVim | ||
|
||
> hyperextensible `Vim-based` text editor, which I generally use for lightweight file editing on the command line. | ||
It is recommended to use `brew` for installation. The in-depth configuration of `NewVim` is quite complex, but there are many pre-configured "distributions" available. Personally, I use `LunarVim` with some customization. | ||
|
||
{{< alert >}} | ||
`LunarVim` involves a large number of dependencies, please carefully follow its [official documentation](https://www.lunarvim.org/) for installation. | ||
{{< /alert >}} | ||
|
||
### JetBrains | ||
|
||
It is recommended to use the [`JetBrains Toolbox App`](https://www.jetbrains.com/toolbox-app/) for installing and managing JetBrains software products. | ||
|
||
### VsCode | ||
|
||
> A lightweight and versatile editor | ||
Recommended to install from the [official website](https://code.visualstudio.com/). | ||
|
||
### Raycast | ||
|
||
> Free and more powerful alternatives to `Alfred` | ||
Recommended to use `brew` for installation, or you can also download and install from the [official website](https://www.raycast.com/). | ||
|
||
{{< alert >}} | ||
The plugin ecosystem is powerful and has a wide range of features. Be sure to browse the [plugin marketplace](https://www.raycast.com/store) thoroughly. | ||
{{< /alert >}} | ||
|
||
### Tuxera | ||
|
||
The NTFS-formatted hard drive for Microsoft can be used on a Mac, but the personal use of that paid software has other alternative options. | ||
|
||
### Peek | ||
|
||
The Mac App Store is available for download, and macOS allows you to quickly preview files by pressing the spacebar. Peek has enhanced this feature, supporting a wider range of file formats. | ||
|
||
### iStat Menus | ||
|
||
> The ultimate system monitor | ||
The new version interface is more visually appealing. The best detector for Mac, with customizable status bar and rich, detailed monitoring data. | ||
|
||
### Better365 | ||
|
||
[The official website is here](https://www.better365.cn/), this company has a large number of practical Mac applications, the ones I use are as follows: | ||
1. iShot: Screenshot, long screenshot, image pasting, annotation, color picking, screen recording tool | ||
2. FastZip: Excellent free compression and decompression tool | ||
3. Automatic input method switching: Can help you automatically switch input methods (Chinese and English) | ||
4. iBar: Hide menu bar icons | ||
5. Better And Better: Essential Mac tool for mouse, trackpad, and keyboard gestures | ||
|
||
### draw.io | ||
|
||
draw.io is free online diagram software for making flowcharts, process diagrams, org charts, UML, ER and network diagrams. | ||
|
||
### Yabai | ||
|
||
> A tiling window manager for macOS based on binary space partitioning | ||
The main issue is that the window switching and management in macOS itself is too slow and cumbersome. I really like its multi-space design, but the switching process is too troublesome. | ||
|
||
yabai has a complete `Wiki`, and you can also refer to my [yabai configuration files](https://github.com/hza2002/dotfiles/tree/main/yabai/.config). | ||
|
||
### SketchyBar | ||
|
||
> A highly customizable macOS status bar replacement | ||
Here is the translation from Chinese to English: | ||
|
||
[GitHub Link](https://github.com/FelixKratz/SketchyBar) is available here, which can be used in conjunction with Yabai, with rich functionality. You can refer to my [configuration file](https://github.com/hza2002/dotfiles/tree/main/sketchybar/.config/sketchybar). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
--- | ||
title: "终极 macOS 配置方案" | ||
date: 2024-10-17T17:08:59+08:00 | ||
tags: ["macOS", "配置"] | ||
--- | ||
|
||
{{< lead >}} | ||
合理的配置和高效的功能软件,打造顺畅、高效工作流 | ||
{{< /lead >}} | ||
|
||
> 内容将按照配置的顺序进行解释,部分内容可根据个人需求进行选择性配置 | ||
{{< alert cardColor="#e63946" iconColor="#1d3557" textColor="#f1faee" >}} | ||
建议先略读全文,不要急于配置,有些应用的深度配置依赖其他应用,万万不可一口气照做到底! | ||
{{< /alert >}} | ||
|
||
## 先决条件 | ||
|
||
### VPN (可选) | ||
|
||
大多计算机相关的应用中国大陆都~~无法~~较难访问,若中国大陆用户想舒适配置请务必完成此步骤。 | ||
|
||
### Command Line Tools (CLT) for Xcode | ||
|
||
对 macOS 用户,系统自带 `bash`、`git` 和 `curl`,在命令行输入 `xcode-select --install` 安装 `CLT for Xcode`。 | ||
|
||
### Homebrew | ||
|
||
> macOs 上最重要的应用,请自行学习 `Homebrew` 详细的各种使用方法 | ||
[Homebrew](https://brew.sh/) 是 macOS 使用最广泛且最好用的包管理器,基本上各类“小”应用(即除了Chrome等大而强健的)都推荐优先使用包管理下载、管理。 | ||
|
||
中国大陆用户推荐按照[清华大学开源软件镜像站](https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/)安装配置,最好直接**换源**。若大陆用户有 `VPN` ,也可直接按照 `Homebrew` 官网使用终端命令直接安装。 | ||
|
||
### GitHub(推荐) | ||
|
||
推荐注册并配置 `GitHub` ssh 协议连接服务。 | ||
|
||
## 基本应用 | ||
|
||
### Zsh | ||
|
||
1. 首先使用 `brew` 安装 `zsh`,设置为默认 `shell` | ||
```shell | ||
brew install zsh | ||
chsh -s $(which zsh) | ||
``` | ||
2. 我使用 `Oh My Zsh` 作为管理使用 `zsh` 的框架和包管理器,按照[官网](https://ohmyz.sh/#install)命令行安装即可 | ||
3. `Oh My Zsh` 有非常丰富的插件系统,推荐安装或启用的插件可参照我的 [`.zshrc`](https://github.com/hza2002/dotfiles/blob/main/zsh/.zshrc),请务必清楚每一行配置文件的含义再添加。 | ||
4. 可使用诸如 [`Starship`](https://starship.rs/) 这样的工具来美化 `prompt`,可参考我的[配置文件](https://github.com/hza2002/dotfiles/blob/main/zsh/.config/starship.toml)。 | ||
|
||
### Node.js | ||
|
||
推荐使用 [`fnm`](https://github.com/Schniz/fnm) 对多 `Node.js` 环境进行版本管理,使用 `brew` 安装,参照其官网进行配置使用即可。 | ||
|
||
### Java | ||
|
||
推荐使用 [`jenv`](https://github.com/jenv/jenv) 对多 `Java` 环境进行版本管理,使用 `brew` 安装,参照其官网进行配置使用即可。 | ||
|
||
### Conda | ||
|
||
推荐安装 `Miniconda`,更轻量,按照[官方文档](https://docs.anaconda.com/miniconda/)安装即可。 | ||
|
||
### Rust | ||
|
||
按照[官网](https://www.rust-lang.org/learn/get-started)使用命令行安装即可。 | ||
|
||
### Golang | ||
|
||
按照[官网](https://go.dev/dl/)使用命令行安装即可。 | ||
|
||
## 生产力工具 | ||
|
||
### Karabiner-Elements | ||
|
||
> 强大且稳定的键盘自定义工具 | ||
推荐[官网](https://karabiner-elements.pqrs.org/)下载,功能强大,对键鼠都有高度自定义的空间。 | ||
|
||
### iTerm2 | ||
|
||
> `iTerm2` 是一款终端模拟器,是 `Terminal` 的替代品,也是 `iTerm` 的继任者。不仅外观更佳且功能更强,推荐配置热键与主题。 | ||
推荐使用 `brew` 安装,也可在[官网](https://iterm2.com/)下载安装。 | ||
|
||
### NeoVim | ||
|
||
> 高度可扩展的基于 `Vim` 的文本编辑器,我一般用于在命令行进行轻量的文件快速编辑 | ||
建议使用 `brew` 安装,`NewVim` 的深度配置较为复杂(博大精深),不过有大量已进行配置的“发行版”,我个人使用 `LunarVim` ,进行了一定的配置。 | ||
|
||
{{< alert >}} | ||
`LunarVim` 涉及大量依赖,请仔细遵循其[官方文档](https://www.lunarvim.org/)安装 | ||
{{< /alert >}} | ||
|
||
### JetBrains | ||
|
||
推荐使用 [`JetBrains Toolbox App`](https://www.jetbrains.com/toolbox-app/) 进行 JetBrains 系列软件的安装、管理。 | ||
|
||
### VsCode | ||
|
||
> 较为轻量全能的编辑器 | ||
推荐[官网](https://code.visualstudio.com/)安装。 | ||
|
||
### Raycast | ||
|
||
> 免费的,更强大的 `Alfred` 的上位替代 | ||
推荐使用 `brew` 安装,也可在[官网](https://www.raycast.com/)下载安装。 | ||
|
||
{{< alert >}} | ||
插件生态强大,功能极多,务必在[插件市场](https://www.raycast.com/store)上好好逛上一逛! | ||
{{< /alert >}} | ||
|
||
### Tuxera | ||
|
||
用于微软的 NTFS 格式硬盘在 Mac 上使用,个人使用该付费软件,有其他替代品。 | ||
|
||
### Peek | ||
|
||
Mac App Store 可下载,macOS 在文件上按空格可快速预览,Peek 加强了该功能,支持更多格式的文件。 | ||
|
||
### iStat Menus | ||
|
||
> 终极系统监视器 | ||
新版本界面更美观了 Mac 上最好用的检测器,可自定义状态栏,丰富详细的监控数据。 | ||
|
||
### Better365 | ||
|
||
[官网在此](https://www.better365.cn/),这个公司有非常多的实用 mac 应用,本人使用的如下: | ||
1. iShot:截图、长截图、贴图、标注、取色、录屏工具 | ||
2. FastZip:优秀免费的压缩解压工具 | ||
3. 自动切换输入法:能帮你自动切换输入法(中英文) | ||
4. iBar:隐藏菜单栏图标 | ||
5. Better And Better:Mac 必备的鼠标、触控板、键盘手势工具 | ||
|
||
### draw.io | ||
|
||
draw.io 是免费的在线图表软件,可用于制作流程图、过程图、组织结构图、UML 图、ER 图和网络图。 | ||
|
||
### Bob | ||
|
||
个人使用该翻译 & OCR 软件,功能强大,在 Mac Appstore 下载,是付费软件。 | ||
|
||
### Yabai | ||
|
||
> macOS 的平铺式窗口管理器 | ||
主要是 macOS 本身的窗口切换和管理过于缓慢繁琐,我很喜欢它多 space 的设计,但是切换太麻烦了。 | ||
|
||
yabai 有完整的 `Wiki`,也可参考我的 [yabai 配置文件](https://github.com/hza2002/dotfiles/tree/main/yabai/.config)。 | ||
|
||
### SketchyBar | ||
|
||
> A highly customizable macOS status bar replacement | ||
[GitHub 链接](https://github.com/FelixKratz/SketchyBar)在此,可配合 Yabai 使用,功能丰富,可参考我的[配置文件](https://github.com/hza2002/dotfiles/tree/main/sketchybar/.config/sketchybar)。 |