X Tutup
Skip to content

long-910/dotfiles

Repository files navigation

Linux macOS ShellCheck License Sponsor

English | 日本語 | 中文

dotfiles

Development environment setup scripts for macOS, Ubuntu, and WSL. Select and install only the feature blocks you need via an interactive menu.


Quick Start

One-line install (curl)

Clone and run the interactive installer in one command:

curl -fsSL https://raw.githubusercontent.com/long-910/dotfiles/main/install.sh | bash

To install everything non-interactively:

curl -fsSL https://raw.githubusercontent.com/long-910/dotfiles/main/install.sh | bash -s -- --all

The repository is cloned to ~/.dotfiles. Set DOTFILES_DIR to override the location:

DOTFILES_DIR=~/my-dotfiles curl -fsSL https://raw.githubusercontent.com/long-910/dotfiles/main/install.sh | bash

bootstrap.sh (git clone)

Select feature blocks from an interactive menu.

git clone https://github.com/long-910/dotfiles.git
cd dotfiles
bash bootstrap.sh

install_and_configure.sh (Legacy)

All-in-one installer. For environments where bootstrap.sh is unavailable.

git clone https://github.com/long-910/dotfiles.git
cd dotfiles
chmod +x install_and_configure.sh
./install_and_configure.sh

Feature Blocks

Block Tools Default
Core zsh, tmux, lsd, emacs, htop, neofetch, yazi ON
Shell starship, fzf, zoxide, atuin ON
Dev gh, ripgrep, direnv, bat, delta, fd, jq, lazygit ON
Node.js fnm + Node LTS + commitizen OFF
Docker Docker CE + Docker Compose OFF

Toggle ON/OFF by entering numbers when bootstrap.sh starts. Non-interactive execution is also available:

bash bootstrap.sh --all                 # All blocks
bash bootstrap.sh --module shell        # Single module
bash bootstrap.sh --non-interactive     # Auto with defaults
bash bootstrap.sh --list                # List modules

Tools

Prompt & Shell Enhancement

Tool Description
starship Fast, customizable cross-shell prompt
fzf Fuzzy finder. Ctrl-R for history, Ctrl-T for files
zoxide Smart cd replacement. z proj jumps to frequent dirs
atuin SQLite-based shell history. Ctrl-R for fuzzy search

Development Tools

Tool Description
gh GitHub CLI. Manage PRs and Issues from the terminal
ripgrep Fast grep alternative. Respects .gitignore
direnv Auto-load per-directory environment variables
bat cat alternative with syntax highlighting
delta Git diff pager with syntax highlighting
fd Fast find alternative
jq Command-line JSON processor
lazygit Terminal UI for git

Terminal Multiplexer

Tool Description
tmux Terminal multiplexer. Auto-starts on login; exit tmux to close the shell

tmux starts automatically when you open a new terminal and attaches to the most recent existing session, or creates a new one. Closing tmux also exits the shell. To disable, remove ~/.zshrc.d/tmux.zsh.

File Management

Tool Description
lsd ls alternative with icons
yazi Terminal file manager. Launch with yy, cd to exit dir

WSL2 — icons not displaying? lsd uses Nerd Fonts for file-type icons. On WSL2 the terminal runs on Windows, so the font must be installed on the Windows side:

  1. Download a Nerd Font (e.g. CaskaydiaCove Nerd Font, JetBrainsMono Nerd Font) from nerdfonts.com
  2. Right-click the .ttf file → Install for all users
  3. In Windows Terminal: Settings → your Ubuntu profile → Appearance → Font face → select the installed font (e.g. CaskaydiaCove Nerd Font Mono)
  4. Restart the terminal

Customization

Prompt (starship)

Edit config/starship.toml to customize. After installation, it is placed at ~/.config/starship.toml.

Per-directory Environment Variables (direnv)

Create .envrc in your project root:

export DATABASE_URL="postgresql://localhost/myapp"
export NODE_ENV="development"
direnv allow   # Required on first use

Project Templates

Quickly scaffold projects with the newproject function:

newproject node  my-app      # Node.js project
newproject python my-script  # Python project

Secrets Management

Store API keys and environment-specific settings in ~/.zshrc.local (not committed to git).

cp dotfiles/.zshrc.local.example ~/.zshrc.local
# Edit ~/.zshrc.local with your editor

See Doc/en/secrets.md for details.


Uninstall

bash uninstall.sh
  • Removes deployed files from ~/.zshrc.d/
  • Restores backups of .zshrc, .tmux.conf, .emacs.el
  • Removes ~/.config/starship.toml and ~/.config/atuin/config.toml
  • Removes git commit.template setting
  • Optionally removes installed packages

Documentation


Supported Environments

Environment Status
macOS (Apple Silicon / Intel)
Ubuntu 22.04 / 24.04
WSL2 (Ubuntu)

License

MIT — See LICENSE for details.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

X Tutup