脚本会改动系统偏好并安装大量软件,README 明确警告不理解其行为就不要运行;仅支持 macOS;fork 后需把 setup 片段和脚本里的用户名换成自己的
bash -c "$(curl -LsS https://raw.githubusercontent.com/alrra/dotfiles/main/src/os/setup.sh)"README 未说明
macOS 开发环境 dotfiles 一键配置,自动装好 Git、shell、tmux、Vim 并软链配置
一套 macOS 和 Ubuntu 的 dotfiles 配置,帮你快速搭好 bash、vim、tmux、git 等命令行开发环境,省去逐项手动配置的麻烦。
核心能力
- 用一条 curl 脚本完成下载、软链与安装
- 软链 Git、shell、tmux、Vim 相关配置文件
- 自动安装 macOS 应用与命令行工具
- 设置自定义 macOS 系统偏好
- 安装 Vim 与 VSCodium 插件
容易踩的坑
暂无 release 数据(可能没有发版,或尚未同步)。
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
alrra’s dotfiles
These are the base dotfiles that I start with when I set up
a new environment (for more specific local needs I use the
*.local files).
Table of Contents
Setup
To set up the dotfiles run the appropriate snippet in the terminal:
[!CAUTION] DO NOT run the setup script if you do not fully understand what it does. Seriously, DON'T!
| OS | Snippet |
|---|---|
| macOS | bash -c "$(curl -LsS https://raw.githubusercontent.com/alrra/dotfiles/main/src/os/setup.sh)" |
That's it! ✨
The setup process will:
- Download the dotfiles on your computer (by default it will suggest
~/projects/dotfiles). - Symlink the Git, shell, tmux, and Vim related files.
- Install applications / command-line tools for macOS.
- Set custom macOS.
- Install the Vim and VSCodium plugins.
Setup process in action:
Screenshots
Git
Output for git status:
![]() |
|---|
| macOS |
Output for git log:
![]() |
|---|
| macOS |
Vim
![]() |
|---|
| macOS |
Customize
Local Settings
The dotfiles can be easily extended to suit additional local requirements by using the following files:
~/.bash.local
The ~/.bash.local file will be automatically sourced after all
the other Bash related files, thus, allowing its content
to add to or overwrite the existing aliases, settings, PATH, etc.
Here is an example:
#!/bin/bash
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set PATH additions.
PATH="/Users/alrra/projects/dotfiles/src/bin/:$PATH"
export PATH
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set local aliases.
alias g="git"
~/.gitconfig.local
The ~/.gitconfig.local file will be automatically included after
the configurations from ~/.gitconfig, thus, allowing its content
to overwrite or add to the existing Git configurations.
Note: Use ~/.gitconfig.local to store sensitive information
such as the Git user credentials, e.g.:
[commit]
gpgsign = true
[gpg]
format = ssh
[gpg "ssh"]
allowedSignersFile = ~/.ssh/allowed_signers
[user]
name = Your Name
email = [email protected]
signingkey = "..."
~/.vimrc.local
The ~/.vimrc.local file will be automatically sourced after
~/.vimrc, thus, allowing its content to add or overwrite the
settings from ~/.vimrc.
Here is an example:
" Disable arrow keys in insert mode.
inoremap <Down> <ESC>:echoe "Use j"<CR>
inoremap <Left> <ESC>:echoe "Use h"<CR>
inoremap <Right> <ESC>:echoe "Use l"<CR>
inoremap <Up> <ESC>:echoe "Use k"<CR>
" Disable arrow keys in normal mode.
nnoremap <Down> :echoe "Use j"<CR>
nnoremap <Left> :echoe "Use h"<CR>
nnoremap <Right> :echoe "Use l"<CR>
nnoremap <Up> :echoe "Use k"<CR>
Forks
If you decide to fork this project, do not forget to substitute my username with your own in the setup snippets and in the setup script.
Update
To update the dotfiles you can either run the setup script or, if you want to update one particular part, run the appropriate os script.
License
The code is available under the MIT license.


