Skip to content

anstapol/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

macOS Setup Automation

This repository contains a script to automate the setup and configuration of macOS. It installs essential software, configures system settings, and applies customizations for Dock, Finder, and Hot Corners.

Prerequisites

  • Homebrew must be installed (if not, the script will handle the installation).

Installation

  1. Clone the repository:

    git clone https://github.com/anstapol/dotfiles.git
    cd dotfiles
  2. Run the setup script:

    ./setup.sh
  3. Restart macOS to ensure all settings are applied correctly.

What This Does

  • Installs Homebrew packages from the Brewfile, including:
    • Formulae (command-line tools, libraries).
    • Casks (GUI applications).
    • App Store apps via mas.
  • Configures macOS settings such as:
    • Dock autohide, magnification, and hot corners.
    • Finder settings, including sidebar & view style.
    • Automatically removes old Trash items after 30 days.

Dotfiles Symlinking

The script automatically creates symbolic links for the following configuration files and directories, backing up any existing ones with a .bak extension:

  • .zshrc to ~/.zshrc
  • .zsh_plugins.txt to ~/.zsh_plugins.txt
  • .zsh_functions to ~/.zsh_functions
  • .config/starship.toml to ~/.config/starship.toml
  • .config/ghostty to ~/.config/ghostty

Customizations

Starship Prompt

The Starship prompt is customized to provide a clean and informative right-aligned prompt. The prompt displays the following information:

  • Git Status: Shows the status of the current Git repository, including stashed, staged, modified, deleted, renamed, untracked, and conflicted files.
  • Git Branch: Displays the current Git branch.
  • Node.js Version: Shows the current Node.js version.
  • Command Duration: Displays the execution time of the last command.
  • pnpm Version: Shows the pnpm version when in a pnpm project.

tinify function

A tinify shell function is available for image compression using ffmpeg. This function can process single images or a batch of images in the current directory.

Usage: tinify [options] <image(s)>

Options:

  • -q, --quality <1-100>: Quality level (default: 85)
  • -o, --output <file>: Output filename
  • -b, --batch: Process all images in current directory
  • -v, --verbose: Show detailed output
  • -h, --help: Show this help

macOS Settings Applied

Dock Customizations:

  • Autohide: Enabling hiding the dock automatically & increasing the animation speeds.
  • Magnification: Magnify Dock icons when hovering over them & setting the exact size.
  • Minimization: Use the "scale" effect & minimized into application icon.
  • Recent Applications: Hides the recent applications section in the Dock.

Finder Customizations:

  • Hide External Hard Drives, Internal Hard Drives, and Removable Media on Desktop.
  • Enable Finder Sidebar, Path Bar, and Status Bar.
  • Set Default Finder View to List View.
  • Arrange Finder Items by Name.
  • Automatically Remove Old Trash Items after 30 days.

Hot Corners Customizations:

  • Bottom-Left: Starts the screen saver (requires Command ⌘ key).
  • Bottom-Right: Opens a Quick Note (requires Command ⌘ key).
  • Top-Left: Locks the screen (requires Command ⌘ key).
  • Top-Right: Opens the Notification Center (requires Command ⌘ key).

Installed Software

Homebrew Formulae:

  • antidote: A fast and lightweight plugin manager for Zsh.
  • awscli: A unified tool to manage AWS services from the command line.
  • cocoapods: A dependency manager for Swift and Objective-C Cocoa projects.
  • colima: Container runtimes on macOS with minimal setup.
  • docker: A platform for developing, shipping, and running applications in containers.
  • docker-buildx: Docker CLI plugin for extended build capabilities with BuildKit.
  • docker-compose: Define and run multi-container applications with Docker.
  • doctl: The official command line interface for DigitalOcean.
  • fastfetch: A neofetch-like tool for fetching system information and displaying them in a pretty way.
  • ffmpeg: A complete, cross-platform solution to record, convert and stream audio and video.
  • fzf: A command-line fuzzy finder.
  • gemini-cli: CLI for Google Gemini.
  • gh: GitHub’s official command line tool.
  • git: A free and open source distributed version control system.
  • gnupg: A complete and free implementation of the OpenPGP standard.
  • jq: Command-line JSON processor.
  • kubernetes-cli: A command-line tool for interacting with Kubernetes clusters.
  • mas: A command-line interface for the Mac App Store.
  • neovim: A hyperextensible Vim-based text editor.
  • nvm: Node Version Manager - Simple bash script to manage multiple active Node.js versions.
  • ollama: Create, run, and share large language models (LLMs).
  • starship: The minimal, blazing-fast, and infinitely customizable prompt for any shell!
  • stern: Tail multiple Kubernetes pods and containers in real time.
  • stripe-cli: A command-line tool for Stripe that helps you build, test, and manage your Stripe integration.
  • vercel-cli: A command-line interface for Vercel that helps you develop and deploy your projects.
  • watchman: A tool by Facebook for watching changes in the filesystem and triggering actions.
  • xh: Friendly and fast tool for sending HTTP requests.

Homebrew Casks:

  • 1Password: A password manager that helps you store and manage your passwords securely.
  • affinity: A suite of professional creative software.
  • Android Studio: The official IDE for Android development.
  • brave-browser: A free and open-source web browser.
  • ChatGPT: Desktop app for interacting with OpenAI's ChatGPT.
  • Claude: An AI assistant developed by Anthropic.
  • cursor: An AI-powered code editor.
  • Discord: A communication platform for voice, video, and text.
  • Figma: A web-based vector graphics editor and prototyping tool.
  • Firefox: A fast, private, and secure web browser.
  • font-maple-mono-nf: A monospace font for developers.
  • ghostty: A modern terminal emulator for macOS.
  • iStat Menus: A powerful system monitoring tool for macOS.
  • Lens: The Kubernetes IDE for managing clusters efficiently.
  • Logi Options+: A powerful and easy-to-use application that enhances your Logitech mice and keyboards.
  • nordvpn: A VPN service that provides secure and private internet access.
  • OnlyOffice: A comprehensive office suite for document management and collaboration.
  • PHPStorm: A professional IDE for PHP developers from JetBrains.
  • Postman: An API platform for building and using APIs.
  • Raycast: A blazingly fast, totally extendable launcher for macOS.
  • SF Symbols: Apple's icon set for developers.
  • Slack: A collaboration platform for teams to communicate and share files.
  • Sublime Text: A sophisticated text editor for code, markup, and prose.
  • TablePlus: A modern, native tool for managing relational databases.
  • tailscale-app: Zero config VPN for building secure networks.
  • Telegram: A cloud-based instant messaging, video telephony, and VoIP service.
  • Transmission: A fast, easy, and free BitTorrent client.
  • VLC: A free and open-source cross-platform multimedia player.
  • WhatsApp: A free messaging and video calling app.
  • zulu@17: An open-source build of the Java Development Kit (JDK).

Mac App Store Applications (installed via mas):

  • Numbers: A spreadsheet application developed by Apple.
  • Pages: A word processor developed by Apple.
  • Permute 3: A media converter for macOS.
  • Xcode: An integrated development environment for macOS, iOS, watchOS, and tvOS.

VSCode Extensions:

Usefull commands

Dump Brew bundle

To keep Brewfile up to date any time new software is installed run the following command.

brew bundle dump --force

About

One script to fully working dev environment πŸš€

Topics

Resources

Stars

Watchers

Forks