Skip to content

HeLongaa/Mac-Dev-Conf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mac-Dev-Conf

A configuration repository for quickly bootstrapping a macOS development terminal environment, currently focused on Ghostty + zsh.

Overview

After running the install script, it will:

  1. Overwrite ~/.zshrc with Ghostty/.zshrc from this repo
  2. Create the Ghostty config directory at ~/Library/Application Support/com.mitchellh.ghostty
  3. Copy Ghostty/config.ghostty into the Ghostty config directory
  4. Copy the Ghostty/.shell directory into your home directory as ~/.shell

Script: install.sh

Project Structure

.
├── install.sh
├── README.md
└── Ghostty
    ├── .shell/
    ├── .zshrc
    ├── config.ghostty
    └── README.md

Prerequisites

  1. OS: macOS
  2. Ghostty installed
  3. Zinit for zsh plugin management installed
  4. zsh as your shell (the script writes to ~/.zshrc)

Quick Start

Run from the repository root:

chmod +x install.sh
./install.sh

On success, you should see:

Done.

If you don't need any custom commands, please delete them.

cp -r "$SCRIPT_DIR/Ghostty/.shell" ~/

in install.sh

for file in ~/.shell/*.sh; do
    [ -f "$file" ] && source "$file"
done

in ~/.zshrc.

Configuration

Ghostty

  • Config file: Ghostty/config.ghostty
  • Default theme: Catppuccin Mocha
  • Font: Maple Mono NF CN
  • Includes quick terminal, split shortcuts, clipboard protection, and shell integration settings

See Ghostty/README.md for more details.

Shell

  • Ghostty/.zshrc: zsh environment variables and initialization entry
  • Ghostty/.shell/: custom shell functions and aliases

Notes

  1. The script overwrites your existing ~/.zshrc
  2. The script overwrites your existing Ghostty config file
  3. If you already have custom settings, back them up first

Suggested backup commands:

cp ~/.zshrc ~/.zshrc.bak.$(date +%Y%m%d%H%M%S)
cp ~/Library/Application\ Support/com.mitchellh.ghostty/config.ghostty \
  ~/Library/Application\ Support/com.mitchellh.ghostty/config.ghostty.bak.$(date +%Y%m%d%H%M%S)

Rollback

If you created backups in advance, restore them with:

cp ~/.zshrc.bak.<timestamp> ~/.zshrc
cp ~/Library/Application\ Support/com.mitchellh.ghostty/config.ghostty.bak.<timestamp> \
  ~/Library/Application\ Support/com.mitchellh.ghostty/config.ghostty

About

A simple Mac development environment setup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages