My personal dotfiles for macOS, Arch Linux, Zsh.
Every folder is a individual configuration for specific tool (or group). Its name is dot
.
The dot
structure is below:
.
|- .scripts
| |- install.sh
|- <config files>
|- README.md
You can execute .scripts/install.sh
to install and config this tool. The installer can help you install tool and link all config files to specific position for setup.
The target of dot
has two types: tool or group.
- When target is tool, it only charges single tool(for example: nvm).
- When target is group, it charges multiple tools for a whole environment(for example: nvim).
You can use your way to set any config by dot
. For my way, I use four dot
to setup my whole complete environment:
. (Root dot)
|- nvim (IDE)
|- gainmiles (Work)
|- personal (Personal)
.
(Root dot): Basic tools of OS and Command Line.nvim
(IDE): Neovim settings.gainmiles
(Work): The specific tools and settings for job.personal
(Personal): The specific tools and settings for my personal use.
This dotfiles use git submodule to manage the third party plugins of the tools. The dircolors and kitty is the example, which using submodule handle theme plugins.
All packages in this dotfiles repo use XDG Base Directory Specification to organize configurations.
The below is the tool list for root dot
. if you want to know what tools include in the else dot
(nvim, personal and work), please see the each dot
README.
-
🔒 SSH
-
🐱 kitty: Cross-platform, fast, feature-rich, GPU based terminal
-
⌨️ Neovim
-
🐳 Docker
-
💹 Draw.io
-
🪶 zoxide: A smarter cd command. Supports all major shells.
-
📚 cheat.sh: the only cheat sheet you need
-
🐭 editorconfig: EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs.
-
✨ Prettier: Prettier is an opinionated code formatter.
-
🟩🧑
✈️ nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions -
🐍🧑
✈️ pyenv: Simple Python version management- 👻 pyenv-virtualenv: a pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)
-
☕🧑
✈️ SDKMAN!: The SDKMAN! Command Line Interface
- macOS
↔️ Rectangle: Move and resize windows on macOS with keyboard shortcuts and snap areas- 🧑
✈️ MAS - 🍺 Homebrew: 🍺 The missing package manager for macOS (or Linux)
- Zsh: Zsh is a shell with lots of features.
- 📄 zsh-autosuggestions: Fish-like autosuggestions for zsh
- 🚘 zsh-completions: Additional completion definitions for Zsh.
- 📰 zsh-history-substring-search: 🐠 ZSH port of Fish history search (up arrow)
- 🌈 zsh-syntax-highlighting: Fish shell like syntax highlighting for Zsh.
- 🆙 Powerlevel10k: A Zsh theme
- tmux: tmux is a terminal multiplexer
- 🧑
✈️ TPM: Tmux Plugin Manager - 🎨 Nord: An arctic, north-bluish clean and elegant tmux color theme.
- 🧑
- 🔖 tmuxinator: Manage complex tmux sessions easily
- Git: Git is a fast, scalable, distributed revision control system
- 🕳️ gitignore.io: Create useful .gitignore files for your project
- 📺 GitUI: Blazing 💥 fast terminal-ui for git written in rust 🦀
- Github CLI
- 🖼️ fastfetch: An actively maintained, feature-rich and performance oriented, neofetch like system information tool.
- 📜 eza: A modern, maintained replacement for ls
- 🦇 BAT: A cat(1) clone with wings.
- 🔍 fd: A simple, fast and user-friendly alternative to 'find'
- 🔎 ripgrep: ripgrep recursively searches directories for a regex pattern while respecting your gitignore
- 🌸 fzf: 🌸 A command-line fuzzy finder
- 🎨 Theme: Nord
- 🔠 Hack Nerd Font
You can install in your host or just docker it.
docker run -it --rm archlinux/archlinux sh -uelic '
export TERM="screen-256color"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/peterhpchen/dotfiles/main/.scripts/install.archlinux.sh)"
zsh
'
xcode-select --install
Install the whole development environment by single command.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/peterhpchen/dotfiles/main/.scripts/install.sh)"
Execute ssh.sh
to generate SSH key and setup.
. "$DOTFILES/.scripts/ssh.sh" "your_email@example.com"
your_email@example.com
is your GitHub email address.
Please view the Github Docs.
The dotfiles-extra
is used to setup some specific environments. It has the same repo structure with peterhpchen/dotfiles
, So we can just pull these submodule and execute .scripts/install.sh
to setup these env.
git submodule init
git pull --recurse-submodules
# personal for example
. "$DOTFILES/personal/.scripts/install.sh"
If your extra dotfiles are in the private repository, you need change dotfiles' git remote path to ssh.
git remote set-url origin git@github.com:peterhpchen/dotfiles.git
Because we use the curl
to download the install script, the remote url of this repository is https
. If we want to push our change to remote repository, we need to change remote origin
from https to ssh.
git remote set-url origin git@github.com:peterhpchen/dotfiles.git
If you want add new submodule (whether external plugins
or dotfiles-extra
), you can use git submodule add
to do this.
# personal for example
git submodule add git@github.com:peterhpchen/dotfiles-personal.git personal
Reset everything by below command.
rm -rf ~/.dotfiles \
~/.zshenv ~/.editorconfig ~/.prettierrc.js \
~/.Brewfile ~/.Brewfile.lock.json \
~/.config/zsh ~/.config/nvm ~/.config/pyenv ~/.config/ripgrep ~/.config/fzf ~/.config/fastfetch ~/.config/tmux ~/.config/kitty ~/.config/git ~/.config/sdkman ~/.config/tmuxinator ~/.config/gh ~/.config/gitui \
~/.local/share/zoxide \
~/.ssh/config ~/.ssh/config.d
You need brew uninstall
after this command.