/mac2k

Ultimate Dev Setup for Mac OS 🚀🍎

Primary LanguageShellGNU General Public License v3.0GPL-3.0

License People Stars Forks Watches Last Updated

Ultimate Dev Setup for Mac OS 🚀🍎

mac2k in action
mac2k in action

mac2k is a set of handcrafted configs for setting up a complete dev environment on Mac OS.

It makes developing on Mac much more pleasant for CLI lovers.

✨ Features

  • Sets up a complete dev environment within minutes
  • Sets up brew and installs essential packages with Brewfile
  • Configures optimal settings for developers
  • All the power and tools provider by dots2k
  • Powerful personalized editing with nvim2k
  • Keyboard driven browsing support with qute2k
  • Tiling window management with Aerospace
  • More!!

Setup

🚀 Installation

git clone https://github.com/2kabhishek/mac2k
cd mac2k

./setup.sh

This will install all necessary packages, symlinks and setup symlinks for you.

To manually run steps from dots2k setup you can run https://github.com/2kabhishek/dots2k/tree/main/setup.sh

💻 Usage

Keybindings

I also set up some keybindings manually, you can find them in the following docs.

Hint: Cmd = ⌘/Command/Windows, Opt = ⌥/Option/Alt, Ctrl = ⌃/Control, fn = Function

Aliases

This also comes with a bunch of mac aliases in dots2k shell/aliases.sh to make your life easier.

  • aerr, aert, aerc for aeropace reload config, toggle and editing config
  • bri, brr, brc, brs, bru to brew install, uninstall, cleanup, search, update respectively
  • macdis to disable mac's internal display, useful when using external display, needs restart to re-enable

Other Configs

For most tools I'm symlinking configs over from dots2k.

Setting up iTerm

I use Alacritty as my default terminal now

Run iTerm and open "Preferences", Go to "Profiles" tab and click on "Other Actions" and then click on "Import JSON Profiles"

Select the ./configs/iterm/preofile.json file and import it.

You can also use the helper script to open iterm from terminal by symlinking it to your path and running iterm.

Tiling Window Management

I use Aerospace as my tiling window manager now

yabai and skhd together provide a tiling window management system for MacOS.

# Symlink yabai and skhd configs
ln -sfn "$PWD/config/.yabairc" "$HOME/"
ln -sfn "$PWD/config/.skhdrc" "$HOME/"

# Start yabai and skhd
yabai --start-service
skhd --start-service

# Add alias to restart yabai and skhd
alias macres="yabai --restart-service && skhd --restart-service"

Behind The Code

🌈 Inspiration

I am a big fan of CLI and Tiling WMs, MacOS by default doesn't provide a good solution for those, so I decided to configure my own.

💡 Challenges/Learnings

  • Some hiccups with brew and services
  • Learned and implemented recursive git submodules

🧰 Tooling

  • dots2k — Personalized Dev Environment
  • nvim2k — Personalized Editor

⭐ hit the star button if you found this useful ⭐

Source | Blog | Twitter | LinkedIn | More Links | Other Projects