├── .github └── FUNDING.yml ├── .gitignore_global ├── .gitmodules ├── .mackup.cfg ├── .macos ├── .zshrc ├── Brewfile ├── LICENSE.md ├── README.md ├── aliases.zsh ├── art ├── banner-1x.png ├── banner-2x.png └── social-card-2x.png ├── bin └── setup ├── clone.sh ├── fresh.sh ├── minimal.zsh-theme ├── path.zsh └── ssh.sh /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: driesvints 4 | custom: ["https://www.paypal.me/driesvints"] 5 | -------------------------------------------------------------------------------- /.gitignore_global: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.com 4 | *.class 5 | *.dll 6 | *.exe 7 | *.o 8 | *.so 9 | 10 | # Packages # 11 | ############ 12 | # it's better to unpack these files and commit the raw source 13 | # git has its own built in compression methods 14 | *.7z 15 | *.dmg 16 | *.gz 17 | *.iso 18 | *.jar 19 | *.rar 20 | *.tar 21 | *.zip 22 | 23 | # Logs and databases # 24 | ###################### 25 | *.log 26 | *.sql 27 | *.sqlite 28 | 29 | # OS generated files # 30 | ###################### 31 | .DS_Store 32 | .DS_Store? 33 | ._* 34 | .Spotlight-V100 35 | .Trashes 36 | ehthumbs.db 37 | Thumbs.db 38 | .idea/ 39 | .vscode 40 | .vagrant/ 41 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "plugins/artisan"] 2 | path = plugins/artisan 3 | url = git@github.com:jessarcher/zsh-artisan.git 4 | -------------------------------------------------------------------------------- /.mackup.cfg: -------------------------------------------------------------------------------- 1 | [storage] 2 | engine = icloud 3 | 4 | [applications_to_ignore] 5 | zsh -------------------------------------------------------------------------------- /.macos: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Thanks to Mathias Bynens! 4 | # ~/.macos — https://mths.be/macos 5 | 6 | # Close any open System Preferences panes, to prevent them from overriding 7 | # settings we’re about to change 8 | osascript -e 'tell application "System Preferences" to quit' 9 | 10 | # Ask for the administrator password upfront 11 | sudo -v 12 | 13 | # Keep-alive: update existing `sudo` time stamp until `.macos` has finished 14 | while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & 15 | 16 | ############################################################################### 17 | # General UI/UX # 18 | ############################################################################### 19 | 20 | # Set computer name (as done via System Preferences → Sharing) 21 | sudo scutil --set ComputerName "MacBook Dries" 22 | sudo scutil --set HostName "MacBook Dries" 23 | sudo scutil --set LocalHostName "MacBook Dries" 24 | sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "MacBook Dries" 25 | 26 | # Disable the sound effects on boot 27 | sudo nvram SystemAudioVolume=" " 28 | 29 | # Disable transparency in the menu bar and elsewhere on Yosemite 30 | # defaults write com.apple.universalaccess reduceTransparency -bool true 31 | 32 | # Set highlight color to green 33 | # defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600" 34 | 35 | # Set sidebar icon size to medium 36 | defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2 37 | 38 | # Always show scrollbars 39 | # defaults write NSGlobalDomain AppleShowScrollBars -string "Always" 40 | # Possible values: `WhenScrolling`, `Automatic` and `Always` 41 | 42 | # Disable the over-the-top focus ring animation 43 | # defaults write NSGlobalDomain NSUseAnimatedFocusRing -bool false 44 | 45 | # Disable smooth scrolling 46 | # (Uncomment if you’re on an older Mac that messes up the animation) 47 | #defaults write NSGlobalDomain NSScrollAnimationEnabled -bool false 48 | 49 | # Increase window resize speed for Cocoa applications 50 | defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 51 | 52 | # Expand save panel by default 53 | defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true 54 | defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true 55 | 56 | # Expand print panel by default 57 | defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true 58 | defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true 59 | 60 | # Save to disk (not to iCloud) by default 61 | # defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false 62 | 63 | # Automatically quit printer app once the print jobs complete 64 | defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true 65 | 66 | # Disable the “Are you sure you want to open this application?” dialog 67 | defaults write com.apple.LaunchServices LSQuarantine -bool false 68 | 69 | # Remove duplicates in the “Open With” menu (also see `lscleanup` alias) 70 | # /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user 71 | 72 | # Display ASCII control characters using caret notation in standard text views 73 | # Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt` 74 | defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true 75 | 76 | # Disable Resume system-wide 77 | # defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false 78 | 79 | # Disable automatic termination of inactive apps 80 | # defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true 81 | 82 | # Disable the crash reporter 83 | #defaults write com.apple.CrashReporter DialogType -string "none" 84 | 85 | # Set Help Viewer windows to non-floating mode 86 | defaults write com.apple.helpviewer DevMode -bool true 87 | 88 | # Fix for the ancient UTF-8 bug in QuickLook (https://mths.be/bbo) 89 | # Commented out, as this is known to cause problems in various Adobe apps :( 90 | # See https://github.com/mathiasbynens/dotfiles/issues/237 91 | #echo "0x08000100:0" > ~/.CFUserTextEncoding 92 | 93 | # Reveal IP address, hostname, OS version, etc. when clicking the clock 94 | # in the login window 95 | sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName 96 | 97 | # Disable Notification Center and remove the menu bar icon 98 | # launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null 99 | 100 | # Disable automatic capitalization as it’s annoying when typing code 101 | # defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false 102 | 103 | # Disable smart dashes as they’re annoying when typing code 104 | defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false 105 | 106 | # Disable automatic period substitution as it’s annoying when typing code 107 | # defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false 108 | 109 | # Disable smart quotes as they’re annoying when typing code 110 | defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false 111 | 112 | # Disable auto-correct 113 | defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false 114 | 115 | # Set a custom wallpaper image. `DefaultDesktop.jpg` is already a symlink, and 116 | # all wallpapers are in `/Library/Desktop Pictures/`. The default is `Wave.jpg`. 117 | #rm -rf ~/Library/Application Support/Dock/desktoppicture.db 118 | #sudo rm -rf /System/Library/CoreServices/DefaultDesktop.jpg 119 | #sudo ln -s /path/to/your/image /System/Library/CoreServices/DefaultDesktop.jpg 120 | 121 | ############################################################################### 122 | # Trackpad, mouse, keyboard, Bluetooth accessories, and input # 123 | ############################################################################### 124 | 125 | # Trackpad: enable tap to click for this user and for the login screen 126 | # defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true 127 | # defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 128 | # defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 129 | 130 | # Trackpad: map bottom right corner to right-click 131 | # defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2 132 | # defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true 133 | # defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1 134 | # defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true 135 | 136 | # Disable “natural” (Lion-style) scrolling 137 | # defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false 138 | 139 | # Increase sound quality for Bluetooth headphones/headsets 140 | defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40 141 | 142 | # Enable full keyboard access for all controls 143 | # (e.g. enable Tab in modal dialogs) 144 | defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 145 | 146 | # Use scroll gesture with the Ctrl (^) modifier key to zoom 147 | # defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true 148 | # defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144 149 | # Follow the keyboard focus while zoomed in 150 | # defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true 151 | 152 | # Disable press-and-hold for keys in favor of key repeat 153 | # defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false 154 | 155 | # Set a blazingly fast keyboard repeat rate 156 | # defaults write NSGlobalDomain KeyRepeat -int 1 157 | # defaults write NSGlobalDomain InitialKeyRepeat -int 10 158 | 159 | # Set language and text formats 160 | # Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with 161 | # `Inches`, `en_GB` with `en_US`, and `true` with `false`. 162 | defaults write NSGlobalDomain AppleLanguages -array "en" "nl" 163 | defaults write NSGlobalDomain AppleLocale -string "en_US@currency=EUR" 164 | defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters" 165 | defaults write NSGlobalDomain AppleMetricUnits -bool true 166 | 167 | # Show language menu in the top right corner of the boot screen 168 | # sudo defaults write /Library/Preferences/com.apple.loginwindow showInputMenu -bool true 169 | 170 | # Set the timezone; see `sudo systemsetup -listtimezones` for other values 171 | sudo systemsetup -settimezone "Europe/Brussels" > /dev/null 172 | 173 | # Stop iTunes from responding to the keyboard media keys 174 | #launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null 175 | 176 | ############################################################################### 177 | # Energy saving # 178 | ############################################################################### 179 | 180 | # Enable lid wakeup 181 | sudo pmset -a lidwake 1 182 | 183 | # Restart automatically on power loss 184 | sudo pmset -a autorestart 1 185 | 186 | # Restart automatically if the computer freezes 187 | sudo systemsetup -setrestartfreeze on 188 | 189 | # Sleep the display after 15 minutes 190 | sudo pmset -a displaysleep 15 191 | 192 | # Disable machine sleep while charging 193 | sudo pmset -c sleep 0 194 | 195 | # Set machine sleep to 5 minutes on battery 196 | sudo pmset -b sleep 5 197 | 198 | # Set standby delay to 24 hours (default is 1 hour) 199 | sudo pmset -a standbydelay 86400 200 | 201 | # Never go into computer sleep mode 202 | sudo systemsetup -setcomputersleep Off > /dev/null 203 | 204 | # Hibernation mode 205 | # 0: Disable hibernation (speeds up entering sleep mode) 206 | # 3: Copy RAM to disk so the system state can still be restored in case of a 207 | # power failure. 208 | sudo pmset -a hibernatemode 0 209 | 210 | # Remove the sleep image file to save disk space 211 | # sudo rm /private/var/vm/sleepimage 212 | # Create a zero-byte file instead… 213 | # sudo touch /private/var/vm/sleepimage 214 | # …and make sure it can’t be rewritten 215 | # sudo chflags uchg /private/var/vm/sleepimage 216 | 217 | ############################################################################### 218 | # Screen # 219 | ############################################################################### 220 | 221 | # Re-enable subpixel antialiasing 222 | defaults write -g CGFontRenderingFontSmoothingDisabled -bool FALSE 223 | 224 | # Require password immediately after sleep or screen saver begins 225 | defaults write com.apple.screensaver askForPassword -int 1 226 | defaults write com.apple.screensaver askForPasswordDelay -int 0 227 | 228 | # Save screenshots to the desktop 229 | # defaults write com.apple.screencapture location -string "${HOME}/Desktop" 230 | 231 | # Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF) 232 | # defaults write com.apple.screencapture type -string "png" 233 | 234 | # Disable shadow in screenshots 235 | # defaults write com.apple.screencapture disable-shadow -bool true 236 | 237 | # Enable subpixel font rendering on non-Apple LCDs 238 | # Reference: https://github.com/kevinSuttle/macOS-Defaults/issues/17#issuecomment-266633501 239 | defaults write NSGlobalDomain AppleFontSmoothing -int 1 240 | 241 | # Enable HiDPI display modes (requires restart) 242 | # sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true 243 | 244 | ############################################################################### 245 | # Finder # 246 | ############################################################################### 247 | 248 | # Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons 249 | # defaults write com.apple.finder QuitMenuItem -bool true 250 | 251 | # Finder: disable window animations and Get Info animations 252 | defaults write com.apple.finder DisableAllAnimations -bool true 253 | 254 | # Set Desktop as the default location for new Finder windows 255 | # For other paths, use `PfLo` and `file:///full/path/here/` 256 | # defaults write com.apple.finder NewWindowTarget -string "PfDe" 257 | # defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Desktop/" 258 | 259 | # Show icons for hard drives, servers, and removable media on the desktop 260 | # defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true 261 | # defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true 262 | # defaults write com.apple.finder ShowMountedServersOnDesktop -bool true 263 | # defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true 264 | 265 | # Finder: show hidden files by default 266 | #defaults write com.apple.finder AppleShowAllFiles -bool true 267 | 268 | # Finder: show all filename extensions 269 | # defaults write NSGlobalDomain AppleShowAllExtensions -bool true 270 | 271 | # Finder: show status bar 272 | # defaults write com.apple.finder ShowStatusBar -bool true 273 | 274 | # Finder: show path bar 275 | defaults write com.apple.finder ShowPathbar -bool true 276 | 277 | # Display full POSIX path as Finder window title 278 | # defaults write com.apple.finder _FXShowPosixPathInTitle -bool true 279 | 280 | # Keep folders on top when sorting by name 281 | defaults write com.apple.finder _FXSortFoldersFirst -bool true 282 | 283 | # When performing a search, search the current folder by default 284 | defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" 285 | 286 | # Disable the warning when changing a file extension 287 | defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false 288 | 289 | # Enable spring loading for directories 290 | # defaults write NSGlobalDomain com.apple.springing.enabled -bool true 291 | 292 | # Remove the spring loading delay for directories 293 | # defaults write NSGlobalDomain com.apple.springing.delay -float 0 294 | 295 | # Avoid creating .DS_Store files on network or USB volumes 296 | defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true 297 | defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true 298 | 299 | # Disable disk image verification 300 | # defaults write com.apple.frameworks.diskimages skip-verify -bool true 301 | # defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true 302 | # defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true 303 | 304 | # Automatically open a new Finder window when a volume is mounted 305 | # defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true 306 | # defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true 307 | # defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true 308 | 309 | # Show item info near icons on the desktop and in other icon views 310 | # /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist 311 | # /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist 312 | # /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist 313 | 314 | # Show item info to the right of the icons on the desktop 315 | # /usr/libexec/PlistBuddy -c "Set DesktopViewSettings:IconViewSettings:labelOnBottom false" ~/Library/Preferences/com.apple.finder.plist 316 | 317 | # Enable snap-to-grid for icons on the desktop and in other icon views 318 | /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist 319 | /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist 320 | /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist 321 | 322 | # Increase grid spacing for icons on the desktop and in other icon views 323 | /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist 324 | /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist 325 | /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist 326 | 327 | # Increase the size of icons on the desktop and in other icon views 328 | /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist 329 | /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist 330 | /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist 331 | 332 | # Use list view in all Finder windows by default 333 | # Four-letter codes for the other view modes: `icnv`, `clmv`, `glyv` 334 | defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" 335 | 336 | # Disable the warning before emptying the Trash 337 | defaults write com.apple.finder WarnOnEmptyTrash -bool false 338 | 339 | # Enable AirDrop over Ethernet and on unsupported Macs running Lion 340 | defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true 341 | 342 | # Show the ~/Library folder 343 | chflags nohidden ~/Library && xattr -d com.apple.FinderInfo ~/Library 344 | 345 | # Show the /Volumes folder 346 | # sudo chflags nohidden /Volumes 347 | 348 | # Remove Dropbox’s green checkmark icons in Finder 349 | # file=/Applications/Dropbox.app/Contents/Resources/emblem-dropbox-uptodate.icns 350 | # [ -e "${file}" ] && mv -f "${file}" "${file}.bak" 351 | 352 | # Expand the following File Info panes: 353 | # “General”, “Open with”, and “Sharing & Permissions” 354 | defaults write com.apple.finder FXInfoPanesExpanded -dict \ 355 | General -bool true \ 356 | OpenWith -bool true \ 357 | Privileges -bool true 358 | 359 | ############################################################################### 360 | # Dock, Dashboard, and hot corners # 361 | ############################################################################### 362 | 363 | # Enable highlight hover effect for the grid view of a stack (Dock) 364 | defaults write com.apple.dock mouse-over-hilite-stack -bool true 365 | 366 | # Set the icon size of Dock items to 36 pixels 367 | # defaults write com.apple.dock tilesize -int 36 368 | 369 | # Change minimize/maximize window effect 370 | defaults write com.apple.dock mineffect -string "scale" 371 | 372 | # Minimize windows into their application’s icon 373 | defaults write com.apple.dock minimize-to-application -bool true 374 | 375 | # Enable spring loading for all Dock items 376 | # defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true 377 | 378 | # Show indicator lights for open applications in the Dock 379 | # defaults write com.apple.dock show-process-indicators -bool true 380 | 381 | # Wipe all (default) app icons from the Dock 382 | # This is only really useful when setting up a new Mac, or if you don’t use 383 | # the Dock to launch apps. 384 | defaults write com.apple.dock persistent-apps -array 385 | 386 | # Show only open applications in the Dock 387 | defaults write com.apple.dock static-only -bool true 388 | 389 | # Don’t animate opening applications from the Dock 390 | defaults write com.apple.dock launchanim -bool false 391 | 392 | # Speed up Mission Control animations 393 | # defaults write com.apple.dock expose-animation-duration -float 0.1 394 | 395 | # Don’t group windows by application in Mission Control 396 | # (i.e. use the old Exposé behavior instead) 397 | # defaults write com.apple.dock expose-group-by-app -bool false 398 | 399 | # Disable Dashboard 400 | defaults write com.apple.dashboard mcx-disabled -bool true 401 | 402 | # Don’t show Dashboard as a Space 403 | defaults write com.apple.dock dashboard-in-overlay -bool true 404 | 405 | # Don’t automatically rearrange Spaces based on most recent use 406 | defaults write com.apple.dock mru-spaces -bool false 407 | 408 | # Remove the auto-hiding Dock delay 409 | defaults write com.apple.dock autohide-delay -float 0 410 | # Remove the animation when hiding/showing the Dock 411 | defaults write com.apple.dock autohide-time-modifier -float 0 412 | 413 | # Automatically hide and show the Dock 414 | defaults write com.apple.dock autohide -bool true 415 | 416 | # Make Dock icons of hidden applications translucent 417 | defaults write com.apple.dock showhidden -bool true 418 | 419 | # Don’t show recent applications in Dock 420 | defaults write com.apple.dock show-recents -bool false 421 | 422 | # Disable the Launchpad gesture (pinch with thumb and three fingers) 423 | #defaults write com.apple.dock showLaunchpadGestureEnabled -int 0 424 | 425 | # Reset Launchpad, but keep the desktop wallpaper intact 426 | find "${HOME}/Library/Application Support/Dock" -name "*-*.db" -maxdepth 1 -delete 427 | 428 | # Add iOS & Watch Simulator to Launchpad 429 | sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app" "/Applications/Simulator.app" 430 | sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator (Watch).app" "/Applications/Simulator (Watch).app" 431 | 432 | # Add a spacer to the left side of the Dock (where the applications are) 433 | #defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}' 434 | # Add a spacer to the right side of the Dock (where the Trash is) 435 | #defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}' 436 | 437 | # Hot corners 438 | # Possible values: 439 | # 0: no-op 440 | # 2: Mission Control 441 | # 3: Show application windows 442 | # 4: Desktop 443 | # 5: Start screen saver 444 | # 6: Disable screen saver 445 | # 7: Dashboard 446 | # 10: Put display to sleep 447 | # 11: Launchpad 448 | # 12: Notification Center 449 | # 13: Lock Screen 450 | # Top left screen corner → Mission Control 451 | # defaults write com.apple.dock wvous-tl-corner -int 2 452 | # defaults write com.apple.dock wvous-tl-modifier -int 0 453 | # Top right screen corner → Desktop 454 | defaults write com.apple.dock wvous-tr-corner -int 10 455 | defaults write com.apple.dock wvous-tr-modifier -int 0 456 | # Bottom left screen corner → Start screen saver 457 | # defaults write com.apple.dock wvous-bl-corner -int 5 458 | # defaults write com.apple.dock wvous-bl-modifier -int 0 459 | 460 | ############################################################################### 461 | # Safari & WebKit # 462 | ############################################################################### 463 | 464 | # Privacy: don’t send search queries to Apple 465 | defaults write com.apple.Safari UniversalSearchEnabled -bool false 466 | defaults write com.apple.Safari SuppressSearchSuggestions -bool true 467 | 468 | # Press Tab to highlight each item on a web page 469 | # defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true 470 | # defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true 471 | 472 | # Show the full URL in the address bar (note: this still hides the scheme) 473 | defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true 474 | 475 | # Set Safari’s home page to `about:blank` for faster loading 476 | # defaults write com.apple.Safari HomePage -string "about:blank" 477 | 478 | # Prevent Safari from opening ‘safe’ files automatically after downloading 479 | # defaults write com.apple.Safari AutoOpenSafeDownloads -bool false 480 | 481 | # Allow hitting the Backspace key to go to the previous page in history 482 | # defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true 483 | 484 | # Hide Safari’s bookmarks bar by default 485 | # defaults write com.apple.Safari ShowFavoritesBar -bool false 486 | 487 | # Hide Safari’s sidebar in Top Sites 488 | # defaults write com.apple.Safari ShowSidebarInTopSites -bool false 489 | 490 | # Disable Safari’s thumbnail cache for History and Top Sites 491 | # defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2 492 | 493 | # Enable Safari’s debug menu 494 | # defaults write com.apple.Safari IncludeInternalDebugMenu -bool true 495 | 496 | # Make Safari’s search banners default to Contains instead of Starts With 497 | # defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false 498 | 499 | # Remove useless icons from Safari’s bookmarks bar 500 | # defaults write com.apple.Safari ProxiesInBookmarksBar "()" 501 | 502 | # Enable the Develop menu and the Web Inspector in Safari 503 | defaults write com.apple.Safari IncludeDevelopMenu -bool true 504 | defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true 505 | defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true 506 | 507 | # Add a context menu item for showing the Web Inspector in web views 508 | # defaults write NSGlobalDomain WebKitDeveloperExtras -bool true 509 | 510 | # Enable continuous spellchecking 511 | # defaults write com.apple.Safari WebContinuousSpellCheckingEnabled -bool true 512 | # Disable auto-correct 513 | # defaults write com.apple.Safari WebAutomaticSpellingCorrectionEnabled -bool false 514 | 515 | # Disable AutoFill 516 | # defaults write com.apple.Safari AutoFillFromAddressBook -bool false 517 | # defaults write com.apple.Safari AutoFillPasswords -bool false 518 | # defaults write com.apple.Safari AutoFillCreditCardData -bool false 519 | # defaults write com.apple.Safari AutoFillMiscellaneousForms -bool false 520 | 521 | # Warn about fraudulent websites 522 | defaults write com.apple.Safari WarnAboutFraudulentWebsites -bool true 523 | 524 | # Disable plug-ins 525 | # defaults write com.apple.Safari WebKitPluginsEnabled -bool false 526 | # defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2PluginsEnabled -bool false 527 | 528 | # Disable Java 529 | # defaults write com.apple.Safari WebKitJavaEnabled -bool false 530 | # defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabled -bool false 531 | # defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabledForLocalFiles -bool false 532 | 533 | # Block pop-up windows 534 | # defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically -bool false 535 | # defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically -bool false 536 | 537 | # Disable auto-playing video 538 | #defaults write com.apple.Safari WebKitMediaPlaybackAllowsInline -bool false 539 | #defaults write com.apple.SafariTechnologyPreview WebKitMediaPlaybackAllowsInline -bool false 540 | #defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback -bool false 541 | #defaults write com.apple.SafariTechnologyPreview com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback -bool false 542 | 543 | # Enable “Do Not Track” 544 | # defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true 545 | 546 | # Update extensions automatically 547 | defaults write com.apple.Safari InstallExtensionUpdatesAutomatically -bool true 548 | 549 | ############################################################################### 550 | # Mail # 551 | ############################################################################### 552 | 553 | # Disable send and reply animations in Mail.app 554 | defaults write com.apple.mail DisableReplyAnimations -bool true 555 | defaults write com.apple.mail DisableSendAnimations -bool true 556 | 557 | # Copy email addresses as `foo@example.com` instead of `Foo Bar ` in Mail.app 558 | defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false 559 | 560 | # Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app 561 | # defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@\U21a9" 562 | 563 | # Display emails in threaded mode, sorted by date (oldest at the top) 564 | # defaults write com.apple.mail DraftsViewerAttributes -dict-add "DisplayInThreadedMode" -string "yes" 565 | # defaults write com.apple.mail DraftsViewerAttributes -dict-add "SortedDescending" -string "yes" 566 | # defaults write com.apple.mail DraftsViewerAttributes -dict-add "SortOrder" -string "received-date" 567 | 568 | # Disable inline attachments (just show the icons) 569 | defaults write com.apple.mail DisableInlineAttachmentViewing -bool true 570 | 571 | # Disable automatic spell checking 572 | defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnabled" 573 | 574 | ############################################################################### 575 | # Spotlight # 576 | ############################################################################### 577 | 578 | # Hide Spotlight tray-icon (and subsequent helper) 579 | #sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search 580 | # Disable Spotlight indexing for any volume that gets mounted and has not yet 581 | # been indexed before. 582 | # Use `sudo mdutil -i off "/Volumes/foo"` to stop indexing any volume. 583 | # sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes" 584 | # Change indexing order and disable some search results 585 | # Yosemite-specific search results (remove them if you are using macOS 10.9 or older): 586 | # MENU_DEFINITION 587 | # MENU_CONVERSION 588 | # MENU_EXPRESSION 589 | # MENU_SPOTLIGHT_SUGGESTIONS (send search queries to Apple) 590 | # MENU_WEBSEARCH (send search queries to Apple) 591 | # MENU_OTHER 592 | # defaults write com.apple.spotlight orderedItems -array \ 593 | # '{"enabled" = 1;"name" = "APPLICATIONS";}' \ 594 | # '{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \ 595 | # '{"enabled" = 1;"name" = "DIRECTORIES";}' \ 596 | # '{"enabled" = 1;"name" = "PDF";}' \ 597 | # '{"enabled" = 1;"name" = "FONTS";}' \ 598 | # '{"enabled" = 0;"name" = "DOCUMENTS";}' \ 599 | # '{"enabled" = 0;"name" = "MESSAGES";}' \ 600 | # '{"enabled" = 0;"name" = "CONTACT";}' \ 601 | # '{"enabled" = 0;"name" = "EVENT_TODO";}' \ 602 | # '{"enabled" = 0;"name" = "IMAGES";}' \ 603 | # '{"enabled" = 0;"name" = "BOOKMARKS";}' \ 604 | # '{"enabled" = 0;"name" = "MUSIC";}' \ 605 | # '{"enabled" = 0;"name" = "MOVIES";}' \ 606 | # '{"enabled" = 0;"name" = "PRESENTATIONS";}' \ 607 | # '{"enabled" = 0;"name" = "SPREADSHEETS";}' \ 608 | # '{"enabled" = 0;"name" = "SOURCE";}' \ 609 | # '{"enabled" = 0;"name" = "MENU_DEFINITION";}' \ 610 | # '{"enabled" = 0;"name" = "MENU_OTHER";}' \ 611 | # '{"enabled" = 0;"name" = "MENU_CONVERSION";}' \ 612 | # '{"enabled" = 0;"name" = "MENU_EXPRESSION";}' \ 613 | # '{"enabled" = 0;"name" = "MENU_WEBSEARCH";}' \ 614 | # '{"enabled" = 0;"name" = "MENU_SPOTLIGHT_SUGGESTIONS";}' 615 | # Load new settings before rebuilding the index 616 | # killall mds > /dev/null 2>&1 617 | # Make sure indexing is enabled for the main volume 618 | # sudo mdutil -i on / > /dev/null 619 | # Rebuild the index from scratch 620 | # sudo mdutil -E / > /dev/null 621 | 622 | ############################################################################### 623 | # Terminal & iTerm 2 # 624 | ############################################################################### 625 | 626 | # Only use UTF-8 in Terminal.app 627 | defaults write com.apple.terminal StringEncodings -array 4 628 | 629 | # Use a modified version of the Solarized Dark theme by default in Terminal.app 630 | # osascript < /dev/null && sudo tmutil disablelocal 703 | 704 | ############################################################################### 705 | # Activity Monitor # 706 | ############################################################################### 707 | 708 | # Show the main window when launching Activity Monitor 709 | defaults write com.apple.ActivityMonitor OpenMainWindow -bool true 710 | 711 | # Visualize CPU usage in the Activity Monitor Dock icon 712 | defaults write com.apple.ActivityMonitor IconType -int 5 713 | 714 | # Show all processes in Activity Monitor 715 | defaults write com.apple.ActivityMonitor ShowCategory -int 0 716 | 717 | # Sort Activity Monitor results by CPU usage 718 | defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage" 719 | defaults write com.apple.ActivityMonitor SortDirection -int 0 720 | 721 | ############################################################################### 722 | # Address Book, Dashboard, iCal, TextEdit, and Disk Utility # 723 | ############################################################################### 724 | 725 | # Enable the debug menu in Address Book 726 | # defaults write com.apple.addressbook ABShowDebugMenu -bool true 727 | 728 | # Enable Dashboard dev mode (allows keeping widgets on the desktop) 729 | # defaults write com.apple.dashboard devmode -bool true 730 | 731 | # Enable the debug menu in iCal (pre-10.8) 732 | # defaults write com.apple.iCal IncludeDebugMenu -bool true 733 | 734 | # Use plain text mode for new TextEdit documents 735 | # defaults write com.apple.TextEdit RichText -int 0 736 | # Open and save files as UTF-8 in TextEdit 737 | # defaults write com.apple.TextEdit PlainTextEncoding -int 4 738 | # defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4 739 | 740 | # Enable the debug menu in Disk Utility 741 | # defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true 742 | # defaults write com.apple.DiskUtility advanced-image-options -bool true 743 | 744 | # Auto-play videos when opened with QuickTime Player 745 | # defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen -bool true 746 | 747 | ############################################################################### 748 | # Mac App Store # 749 | ############################################################################### 750 | 751 | # Enable the WebKit Developer Tools in the Mac App Store 752 | defaults write com.apple.appstore WebKitDeveloperExtras -bool true 753 | 754 | # Enable Debug Menu in the Mac App Store 755 | # defaults write com.apple.appstore ShowDebugMenu -bool true 756 | 757 | # Enable the automatic update check 758 | defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true 759 | 760 | # Check for software updates daily, not just once per week 761 | defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 762 | 763 | # Download newly available updates in background 764 | defaults write com.apple.SoftwareUpdate AutomaticDownload -int 1 765 | 766 | # Install System data files & security updates 767 | defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 1 768 | 769 | # Automatically download apps purchased on other Macs 770 | # defaults write com.apple.SoftwareUpdate ConfigDataInstall -int 1 771 | 772 | # Turn on app auto-update 773 | defaults write com.apple.commerce AutoUpdate -bool true 774 | 775 | # Allow the App Store to reboot machine on macOS updates 776 | # defaults write com.apple.commerce AutoUpdateRestartRequired -bool true 777 | 778 | ############################################################################### 779 | # Photos # 780 | ############################################################################### 781 | 782 | # Prevent Photos from opening automatically when devices are plugged in 783 | defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true 784 | 785 | ############################################################################### 786 | # Messages # 787 | ############################################################################### 788 | 789 | # Disable automatic emoji substitution (i.e. use plain text smileys) 790 | # defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticEmojiSubstitutionEnablediMessage" -bool false 791 | 792 | # Disable smart quotes as it’s annoying for messages that contain code 793 | # defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false 794 | 795 | # Disable continuous spell checking 796 | # defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false 797 | 798 | ############################################################################### 799 | # Google Chrome & Google Chrome Canary # 800 | ############################################################################### 801 | 802 | # Disable the all too sensitive backswipe on trackpads 803 | # defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false 804 | # defaults write com.google.Chrome.canary AppleEnableSwipeNavigateWithScrolls -bool false 805 | 806 | # Disable the all too sensitive backswipe on Magic Mouse 807 | # defaults write com.google.Chrome AppleEnableMouseSwipeNavigateWithScrolls -bool false 808 | # defaults write com.google.Chrome.canary AppleEnableMouseSwipeNavigateWithScrolls -bool false 809 | 810 | # Use the system-native print preview dialog 811 | # defaults write com.google.Chrome DisablePrintPreview -bool true 812 | # defaults write com.google.Chrome.canary DisablePrintPreview -bool true 813 | 814 | # Expand the print dialog by default 815 | defaults write com.google.Chrome PMPrintingExpandedStateForPrint2 -bool true 816 | defaults write com.google.Chrome.canary PMPrintingExpandedStateForPrint2 -bool true 817 | 818 | ############################################################################### 819 | # Opera & Opera Developer # 820 | ############################################################################### 821 | 822 | # Expand the print dialog by default 823 | # defaults write com.operasoftware.Opera PMPrintingExpandedStateForPrint2 -boolean true 824 | # defaults write com.operasoftware.OperaDeveloper PMPrintingExpandedStateForPrint2 -boolean true 825 | 826 | ############################################################################### 827 | # SizeUp.app # 828 | ############################################################################### 829 | 830 | # Start SizeUp at login 831 | # defaults write com.irradiatedsoftware.SizeUp StartAtLogin -bool true 832 | 833 | # Don’t show the preferences window on next start 834 | # defaults write com.irradiatedsoftware.SizeUp ShowPrefsOnNextStart -bool false 835 | 836 | ############################################################################### 837 | # Sublime Text # 838 | ############################################################################### 839 | 840 | # Install Sublime Text settings 841 | # cp -r init/Preferences.sublime-settings ~/Library/Application\ Support/Sublime\ Text*/Packages/User/Preferences.sublime-settings 2> /dev/null 842 | 843 | ############################################################################### 844 | # Spectacle.app # 845 | ############################################################################### 846 | 847 | # Set up my preferred keyboard shortcuts 848 | # cp -r init/spectacle.json ~/Library/Application\ Support/Spectacle/Shortcuts.json 2> /dev/null 849 | 850 | ############################################################################### 851 | # Transmission.app # 852 | ############################################################################### 853 | 854 | # Use `~/Documents/Torrents` to store incomplete downloads 855 | defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true 856 | defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Documents/Torrents" 857 | 858 | # Use `~/Downloads` to store completed downloads 859 | defaults write org.m0k.transmission DownloadLocationConstant -bool true 860 | 861 | # Don’t prompt for confirmation before downloading 862 | defaults write org.m0k.transmission DownloadAsk -bool false 863 | defaults write org.m0k.transmission MagnetOpenAsk -bool false 864 | 865 | # Don’t prompt for confirmation before removing non-downloading active transfers 866 | defaults write org.m0k.transmission CheckRemoveDownloading -bool true 867 | 868 | # Trash original torrent files 869 | defaults write org.m0k.transmission DeleteOriginalTorrent -bool true 870 | 871 | # Hide the donate message 872 | defaults write org.m0k.transmission WarningDonate -bool false 873 | # Hide the legal disclaimer 874 | defaults write org.m0k.transmission WarningLegal -bool false 875 | 876 | # IP block list. 877 | # Source: https://giuliomac.wordpress.com/2014/02/19/best-blocklist-for-transmission/ 878 | defaults write org.m0k.transmission BlocklistNew -bool true 879 | defaults write org.m0k.transmission BlocklistURL -string "http://john.bitsurge.net/public/biglist.p2p.gz" 880 | defaults write org.m0k.transmission BlocklistAutoUpdate -bool true 881 | 882 | # Randomize port on launch 883 | defaults write org.m0k.transmission RandomPort -bool true 884 | 885 | ############################################################################### 886 | # Twitter.app # 887 | ############################################################################### 888 | 889 | # Disable smart quotes as it’s annoying for code tweets 890 | # defaults write com.twitter.twitter-mac AutomaticQuoteSubstitutionEnabled -bool false 891 | 892 | # Show the app window when clicking the menu bar icon 893 | defaults write com.twitter.twitter-mac MenuItemBehavior -int 1 894 | 895 | # Enable the hidden ‘Develop’ menu 896 | defaults write com.twitter.twitter-mac ShowDevelopMenu -bool true 897 | 898 | # Open links in the background 899 | defaults write com.twitter.twitter-mac openLinksInBackground -bool true 900 | 901 | # Allow closing the ‘new tweet’ window by pressing `Esc` 902 | defaults write com.twitter.twitter-mac ESCClosesComposeWindow -bool true 903 | 904 | # Show full names rather than Twitter handles 905 | defaults write com.twitter.twitter-mac ShowFullNames -bool true 906 | 907 | # Hide the app in the background if it’s not the front-most window 908 | defaults write com.twitter.twitter-mac HideInBackground -bool true 909 | 910 | ############################################################################### 911 | # Tweetbot.app # 912 | ############################################################################### 913 | 914 | # Bypass the annoyingly slow t.co URL shortener 915 | defaults write com.tapbots.TweetbotMac OpenURLsDirectly -bool true 916 | 917 | ############################################################################### 918 | # Kill affected applications # 919 | ############################################################################### 920 | 921 | for app in "Activity Monitor" \ 922 | "Address Book" \ 923 | "Calendar" \ 924 | "cfprefsd" \ 925 | "Contacts" \ 926 | "Dock" \ 927 | "Finder" \ 928 | "Google Chrome Canary" \ 929 | "Google Chrome" \ 930 | "Mail" \ 931 | "Messages" \ 932 | "Opera" \ 933 | "Photos" \ 934 | "Safari" \ 935 | "SizeUp" \ 936 | "Spectacle" \ 937 | "SystemUIServer" \ 938 | "Terminal" \ 939 | "Transmission" \ 940 | "Tweetbot" \ 941 | "Twitter" \ 942 | "iCal"; do 943 | killall "${app}" &> /dev/null 944 | done 945 | echo "Done. Note that some of these changes require a logout/restart to take effect." 946 | -------------------------------------------------------------------------------- /.zshrc: -------------------------------------------------------------------------------- 1 | # Path to your dotfiles. 2 | export DOTFILES=$HOME/.dotfiles 3 | 4 | # If you come from bash you might have to change your $PATH. 5 | # export PATH=$HOME/bin:/usr/local/bin:$PATH 6 | 7 | # Path to your oh-my-zsh installation. 8 | export ZSH="$HOME/.oh-my-zsh" 9 | 10 | # Minimal - Theme Settings 11 | export MNML_INSERT_CHAR="$" 12 | export MNML_PROMPT=(mnml_git mnml_keymap) 13 | export MNML_RPROMPT=('mnml_cwd 20') 14 | 15 | # Set name of the theme to load --- if set to "random", it will 16 | # load a random theme each time oh-my-zsh is loaded, in which case, 17 | # to know which specific one was loaded, run: echo $RANDOM_THEME 18 | # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes 19 | ZSH_THEME="minimal" 20 | 21 | # Set list of themes to pick from when loading at random 22 | # Setting this variable when ZSH_THEME=random will cause zsh to load 23 | # a theme from this variable instead of looking in $ZSH/themes/ 24 | # If set to an empty array, this variable will have no effect. 25 | # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) 26 | 27 | # Uncomment the following line to use case-sensitive completion. 28 | # CASE_SENSITIVE="true" 29 | 30 | # Uncomment the following line to use hyphen-insensitive completion. 31 | # Case-sensitive completion must be off. _ and - will be interchangeable. 32 | # HYPHEN_INSENSITIVE="true" 33 | 34 | # Uncomment one of the following lines to change the auto-update behavior 35 | # zstyle ':omz:update' mode disabled # disable automatic updates 36 | # zstyle ':omz:update' mode auto # update automatically without asking 37 | # zstyle ':omz:update' mode reminder # just remind me to update when it's time 38 | 39 | # Uncomment the following line to change how often to auto-update (in days). 40 | # zstyle ':omz:update' frequency 13 41 | 42 | # Uncomment the following line if pasting URLs and other text is messed up. 43 | # DISABLE_MAGIC_FUNCTIONS="true" 44 | 45 | # Uncomment the following line to disable colors in ls. 46 | # DISABLE_LS_COLORS="true" 47 | 48 | # Uncomment the following line to disable auto-setting terminal title. 49 | # DISABLE_AUTO_TITLE="true" 50 | 51 | # Uncomment the following line to enable command auto-correction. 52 | # ENABLE_CORRECTION="true" 53 | 54 | # Uncomment the following line to display red dots whilst waiting for completion. 55 | # You can also set it to another string to have that shown instead of the default red dots. 56 | # e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" 57 | # Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) 58 | # COMPLETION_WAITING_DOTS="true" 59 | 60 | # Uncomment the following line if you want to disable marking untracked files 61 | # under VCS as dirty. This makes repository status check for large repositories 62 | # much, much faster. 63 | # DISABLE_UNTRACKED_FILES_DIRTY="true" 64 | 65 | # Uncomment the following line if you want to change the command execution time 66 | # stamp shown in the history command output. 67 | # You can set one of the optional three formats: 68 | # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" 69 | # or set a custom format using the strftime function format specifications, 70 | # see 'man strftime' for details. 71 | HIST_STAMPS="dd/mm/yyyy" 72 | 73 | # Would you like to use another custom folder than $ZSH/custom? 74 | ZSH_CUSTOM=$DOTFILES 75 | 76 | # Which plugins would you like to load? 77 | # Standard plugins can be found in $ZSH/plugins/ 78 | # Custom plugins may be added to $ZSH_CUSTOM/plugins/ 79 | # Example format: plugins=(rails git textmate ruby lighthouse) 80 | # Add wisely, as too many plugins slow down shell startup. 81 | plugins=(artisan git) 82 | 83 | source $ZSH/oh-my-zsh.sh 84 | 85 | # User configuration 86 | 87 | # export MANPATH="/usr/local/man:$MANPATH" 88 | 89 | # You may need to manually set your language environment 90 | export LC_ALL=en_US.UTF-8 91 | export LANG=en_US.UTF-8 92 | 93 | # Preferred editor for local and remote sessions 94 | # if [[ -n $SSH_CONNECTION ]]; then 95 | # export EDITOR='vim' 96 | # else 97 | # export EDITOR='mvim' 98 | # fi 99 | 100 | # Compilation flags 101 | # export ARCHFLAGS="-arch x86_64" 102 | 103 | # Set personal aliases, overriding those provided by oh-my-zsh libs, 104 | # plugins, and themes. Aliases can be placed here, though oh-my-zsh 105 | # users are encouraged to define aliases within the ZSH_CUSTOM folder. 106 | # For a full list of active aliases, run `alias`. 107 | # 108 | # Example aliases 109 | # alias zshconfig="mate ~/.zshrc" 110 | # alias ohmyzsh="mate ~/.oh-my-zsh" 111 | 112 | # Herd injected PHP binary. 113 | export PHP_INI_SCAN_DIR="$HOME/Library/Application Support/Herd/config/php/":$PHP_INI_SCAN_DIR 114 | 115 | # Herd injected NVM configuration 116 | export NVM_DIR="$HOME/Library/Application Support/Herd/config/nvm" 117 | 118 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm 119 | 120 | [[ -f "/Applications/Herd.app/Contents/Resources/config/shell/zshrc.zsh" ]] && builtin source "/Applications/Herd.app/Contents/Resources/config/shell/zshrc.zsh" 121 | 122 | # Herd injected PHP 7.4 configuration. 123 | export HERD_PHP_74_INI_SCAN_DIR="/Users/driesvints/Library/Application Support/Herd/config/php/74/" 124 | 125 | # Herd injected PHP 8.3 configuration. 126 | export HERD_PHP_83_INI_SCAN_DIR="/Users/driesvints/Library/Application Support/Herd/config/php/83/" 127 | 128 | # Herd injected PHP 8.2 configuration. 129 | export HERD_PHP_82_INI_SCAN_DIR="/Users/driesvints/Library/Application Support/Herd/config/php/82/" 130 | 131 | # Herd injected PHP 8.1 configuration. 132 | export HERD_PHP_81_INI_SCAN_DIR="/Users/driesvints/Library/Application Support/Herd/config/php/81/" 133 | 134 | # Herd injected PHP 8.0 configuration. 135 | export HERD_PHP_80_INI_SCAN_DIR="/Users/driesvints/Library/Application Support/Herd/config/php/80/" 136 | 137 | # Herd injected PHP binary. 138 | export PATH="/Users/driesvints/Library/Application Support/Herd/bin/":$PATH 139 | 140 | 141 | # Herd injected PHP 8.4 configuration. 142 | export HERD_PHP_84_INI_SCAN_DIR="/Users/driesvints/Library/Application Support/Herd/config/php/84/" 143 | -------------------------------------------------------------------------------- /Brewfile: -------------------------------------------------------------------------------- 1 | # Taps 2 | tap 'homebrew/cask-fonts' 3 | tap 'homebrew/cask-versions' 4 | tap 'homebrew/bundle' 5 | tap 'stripe/stripe-cli' 6 | 7 | # Binaries 8 | brew 'awscli' 9 | brew 'bash' # Latest Bash version 10 | brew 'bat' # Used for spatie/visit 11 | brew 'coreutils' # Those that come with macOS are outdated 12 | brew 'ffmpeg' 13 | brew 'gh' 14 | brew 'git' 15 | brew 'grep' 16 | brew 'httpie' 17 | brew 'jq' # Used for spatie/visit 18 | brew 'mackup' 19 | brew 'mas' # Mac App Store manager 20 | brew 'pkg-config' # https://github.com/driesvints/dotfiles/issues/20 21 | brew 'stripe/stripe-cli/stripe' 22 | brew 'stripe/stripe-mock/stripe-mock' 23 | brew 'svn' # Needed to install fonts 24 | 25 | # Spatie Medialibrary 26 | brew 'jpegoptim' 27 | brew 'optipng' 28 | brew 'pngquant' 29 | brew 'svgo' 30 | brew 'gifsicle' 31 | 32 | # Development 33 | brew 'imagemagick' 34 | brew 'yarn' 35 | 36 | # Apps 37 | cask '1password' 38 | brew '1password-cli' 39 | cask 'caffeine' 40 | cask 'discord' 41 | cask 'docker' 42 | cask 'figma' 43 | cask 'firefox' 44 | cask 'github' 45 | cask 'google-chrome' 46 | cask 'helo' 47 | cask 'herd' 48 | cask 'httpie' 49 | cask 'imageoptim' 50 | cask 'loom' 51 | cask 'pastebot' 52 | cask 'reflex' 53 | cask 'screen-studio' 54 | cask 'slack' 55 | cask 'tableplus' 56 | cask 'telegram-desktop' 57 | cask 'the-unarchiver' 58 | cask 'tinkerwell' 59 | cask 'transmit' 60 | cask 'tunnelbear' 61 | cask 'tuple' 62 | cask 'visual-studio-code' 63 | cask 'zoom' 64 | 65 | # Quicklook 66 | cask 'qlmarkdown' 67 | cask 'quicklook-json' 68 | 69 | # Fonts 70 | cask 'font-lato' 71 | cask 'font-open-sans' 72 | cask 'font-roboto' 73 | cask 'font-source-code-pro-for-powerline' 74 | cask 'font-source-code-pro' 75 | cask 'font-source-sans-pro' 76 | cask 'font-source-serif-pro' 77 | 78 | # Mac App Store 79 | mas 'Byword', id: 420212497 80 | mas 'Giphy Capture', id: 668208984 81 | mas 'Keynote', id: 409183694 82 | mas 'MyWoosh', id: 1498889644 83 | mas 'Numbers', id: 409203825 84 | mas 'Speedtest', id: 1153157709 85 | mas 'Spring', id: 1508706541 86 | mas 'Things', id: 904280696 87 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Dries Vints 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | ## Introduction 4 | 5 | This repository serves as my way to help me setup and maintain my Mac. It takes the effort out of installing everything manually. Everything needed to install my preferred setup of macOS is detailed in this readme. Feel free to explore, learn and copy parts for your own dotfiles. Enjoy! 6 | 7 | 📖 - [Read the blog post](https://driesvints.com/blog/getting-started-with-dotfiles) 8 | 📺 - [Watch the screencast on Laracasts](https://laracasts.com/series/guest-spotlight/episodes/1) 9 | 💡 - [Learn how to build your own dotfiles](https://github.com/driesvints/dotfiles#your-own-dotfiles) 10 | 11 | If you find this repo useful, [consider sponsoring me](https://github.com/sponsors/driesvints) (a little bit)! ❤️ 12 | 13 | ## A Fresh macOS Setup 14 | 15 | These instructions are for setting up new Mac devices. Instead, if you want to get started building your own dotfiles, you can [find those instructions below](#your-own-dotfiles). 16 | 17 | ### Backup your data 18 | 19 | If you're migrating from an existing Mac, you should first make sure to backup all of your existing data. Go through the checklist below to make sure you didn't forget anything before you migrate. 20 | 21 | - Did you commit and push any changes/branches to your git repositories? 22 | - Did you remember to save all important documents from non-iCloud directories? 23 | - Did you save all of your work from apps which aren't synced through iCloud? 24 | - Did you remember to export important data from your local database? 25 | - Did you update [mackup](https://github.com/lra/mackup) to the latest version and ran `mackup backup`? 26 | 27 | ### Setting up your Mac 28 | 29 | After backing up your old Mac you may now follow these install instructions to setup a new one. 30 | 31 | 1. Update macOS to the latest version through system preferences 32 | 2. Setup an SSH key by using one of the two following methods 33 | 2.1. If you use 1Password, install it with the 1Password [SSH agent](https://developer.1password.com/docs/ssh/get-started/#step-3-turn-on-the-1password-ssh-agent) and sync your SSH keys locally. 34 | 2.2. Otherwise [generate a new public and private SSH key](https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) by running: 35 | 36 | ```zsh 37 | curl https://raw.githubusercontent.com/driesvints/dotfiles/HEAD/ssh.sh | sh -s "" 38 | ``` 39 | 40 | 3. Clone this repo to `~/.dotfiles` with: 41 | 42 | ```zsh 43 | git clone --recursive git@github.com:driesvints/dotfiles.git ~/.dotfiles 44 | ``` 45 | 46 | 4. Run the installation with: 47 | 48 | ```zsh 49 | cd ~/.dotfiles && ./fresh.sh 50 | ``` 51 | 52 | 5. Start `Herd.app` and run its install process 53 | 6. After mackup is synced with your cloud storage, restore preferences by running `mackup restore` 54 | 7. Restart your computer to finalize the process 55 | 56 | Your Mac is now ready to use! 57 | 58 | > 💡 You can use a different location than `~/.dotfiles` if you want. Make sure you also update the references in the [`.zshrc`](./.zshrc#L2) and [`fresh.sh`](./fresh.sh#L20) files. 59 | 60 | ### Cleaning your old Mac (optionally) 61 | 62 | After you've set up your new Mac you may want to wipe and clean install your old Mac. Follow [this article](https://support.apple.com/guide/mac-help/erase-and-reinstall-macos-mh27903/mac) to do that. Remember to [backup your data](#backup-your-data) first! 63 | 64 | ## Your Own Dotfiles 65 | 66 | **Please note that the instructions below assume you already have set up Oh My Zsh so make sure to first [install Oh My Zsh](https://github.com/robbyrussell/oh-my-zsh#getting-started) before you continue.** 67 | 68 | If you want to start with your own dotfiles from this setup, it's pretty easy to do so. First of all you'll need to fork this repo. After that you can tweak it the way you want. 69 | 70 | Go through the [`.macos`](./.macos) file and adjust the settings to your liking. You can find much more settings at [the original script by Mathias Bynens](https://github.com/mathiasbynens/dotfiles/blob/master/.macos) and [Kevin Suttle's macOS Defaults project](https://github.com/kevinSuttle/MacOS-Defaults). 71 | 72 | Check out the [`Brewfile`](./Brewfile) file and adjust the apps you want to install for your machine. Use [their search page](https://formulae.brew.sh/cask/) to check if the app you want to install is available. 73 | 74 | Check out the [`aliases.zsh`](./aliases.zsh) file and add your own aliases. If you need to tweak your `$PATH` check out the [`path.zsh`](./path.zsh) file. These files get loaded in because the `$ZSH_CUSTOM` setting points to the `.dotfiles` directory. You can adjust the [`.zshrc`](./.zshrc) file to your liking to tweak your Oh My Zsh setup. More info about how to customize Oh My Zsh can be found [here](https://github.com/robbyrussell/oh-my-zsh/wiki/Customization). 75 | 76 | When installing these dotfiles for the first time you'll need to backup all of your settings with Mackup. Install Mackup and backup your settings with the commands below. Your settings will be synced to iCloud so you can use them to sync between computers and reinstall them when reinstalling your Mac. If you want to save your settings to a different directory or different storage than iCloud, [checkout the documentation](https://github.com/lra/mackup/blob/master/doc/README.md#storage). Also make sure your `.zshrc` file is symlinked from your dotfiles repo to your home directory. 77 | 78 | ```zsh 79 | brew install mackup 80 | mackup backup 81 | ``` 82 | 83 | You can tweak the shell theme, the Oh My Zsh settings and much more. Go through the files in this repo and tweak everything to your liking. 84 | 85 | Enjoy your own Dotfiles! 86 | 87 | ## Thanks To... 88 | 89 | I first got the idea for starting this project by visiting the [GitHub does dotfiles](https://dotfiles.github.io/) project. Both [Zach Holman](https://github.com/holman/dotfiles) and [Mathias Bynens](https://github.com/mathiasbynens/dotfiles) were great sources of inspiration. [Sourabh Bajaj](https://twitter.com/sb2nov/)'s [Mac OS X Setup Guide](http://sourabhbajaj.com/mac-setup/) proved to be invaluable. Thanks to [@subnixr](https://github.com/subnixr) for [his awesome Zsh theme](https://github.com/subnixr/minimal)! Thanks to [Caneco](https://twitter.com/caneco) for the header in this readme. And lastly, I'd like to thank [Emma Fabre](https://twitter.com/anahkiasen) for [her excellent presentation on Homebrew](https://speakerdeck.com/anahkiasen/a-storm-homebrewin) which made me migrate a lot to a [`Brewfile`](./Brewfile) and [Mackup](https://github.com/lra/mackup). 90 | 91 | In general, I'd like to thank every single one who open-sources their dotfiles for their effort to contribute something to the open-source community. 92 | -------------------------------------------------------------------------------- /aliases.zsh: -------------------------------------------------------------------------------- 1 | # Shortcuts 2 | alias copyssh="pbcopy < $HOME/.ssh/id_ed25519.pub" 3 | alias reloadshell="omz reload" 4 | alias reloaddns="dscacheutil -flushcache && sudo killall -HUP mDNSResponder" 5 | alias ll="/opt/homebrew/opt/coreutils/libexec/gnubin/ls -AhlFo --color --group-directories-first" 6 | alias phpstorm='open -a /Applications/PhpStorm.app "`pwd`"' 7 | alias shrug="echo '¯\_(ツ)_/¯' | pbcopy" 8 | alias compile="commit 'compile'" 9 | alias timestamp="date +%s" 10 | alias version="commit 'version'" 11 | 12 | # Directories 13 | alias dotfiles="cd $DOTFILES" 14 | alias library="cd $HOME/Library" 15 | alias projects="cd $HOME/Code" 16 | alias sites="cd $HOME/Herd" 17 | 18 | # Laravel 19 | alias a="herd php artisan" 20 | alias fresh="herd php artisan migrate:fresh --seed" 21 | alias tinker="herd php artisan tinker" 22 | alias seed="herd php artisan db:seed" 23 | alias serve="herd php artisan serve" 24 | 25 | # PHP 26 | alias cfresh="rm -rf vendor/ composer.lock && composer i" 27 | alias composer="herd composer" 28 | alias php="herd php" 29 | 30 | # JS 31 | alias nfresh="rm -rf node_modules/ package-lock.json && npm install" 32 | alias watch="npm run dev" 33 | 34 | # Docker 35 | alias docker-composer="docker-compose" 36 | 37 | # SQL Server 38 | alias mssql="docker run -e ACCEPT_EULA=Y -e SA_PASSWORD=LaravelWow1986! -p 1433:1433 mcr.microsoft.com/mssql/server:2017-latest" 39 | 40 | # Git 41 | alias gs="git status" 42 | alias gb="git branch" 43 | alias gc="git checkout" 44 | alias gl="git log --oneline --decorate --color" 45 | alias amend="git add . && git commit --amend --no-edit" 46 | alias commit="git add . && git commit -m" 47 | alias diff="git diff" 48 | alias force="git push --force-with-lease" 49 | alias nuke="git clean -df && git reset --hard" 50 | alias pop="git stash pop" 51 | alias prune="git fetch --prune" 52 | alias pull="git pull" 53 | alias push="git push" 54 | alias resolve="git add . && git commit --no-edit" 55 | alias stash="git stash -u" 56 | alias unstage="git restore --staged ." 57 | alias wip="commit wip" 58 | -------------------------------------------------------------------------------- /art/banner-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driesvints/dotfiles/85b3d66643974ebaa5180a3d7aaea6580238a646/art/banner-1x.png -------------------------------------------------------------------------------- /art/banner-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driesvints/dotfiles/85b3d66643974ebaa5180a3d7aaea6580238a646/art/banner-2x.png -------------------------------------------------------------------------------- /art/social-card-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driesvints/dotfiles/85b3d66643974ebaa5180a3d7aaea6580238a646/art/social-card-2x.png -------------------------------------------------------------------------------- /bin/setup: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Setting up test project..." 4 | 5 | REPOSITORY=$1 6 | DIRECTORY="./$2" 7 | 8 | if [[ $PWD != "$HOME/Herd" ]]; then 9 | echo "You can only setup projects in the $HOME/Herd directory." 10 | 11 | exit 1 12 | fi 13 | 14 | if [ -z "$REPOSITORY" ] || [ -z "$DIRECTORY" ]; then 15 | echo "Please provide both a repository and target directory." 16 | 17 | exit 1 18 | fi 19 | 20 | git clone $REPOSITORY $DIRECTORY 21 | cd $DIRECTORY 22 | 23 | touch database/database.sqlite 24 | 25 | cp .env.example .env 26 | sed -i '' 's/DB_DATABASE=.*/DB_DATABASE=laravel/' .env 27 | sed -i '' 's/DB_USERNAME=.*/DB_USERNAME=root/' .env 28 | sed -i '' 's/DB_PASSWORD=.*/DB_PASSWORD=/' .env 29 | 30 | composer install 31 | php artisan key:generate 32 | php artisan migrate:fresh --seed 33 | 34 | npm install 35 | npm run build 36 | 37 | open -a "/Applications/Visual Studio Code.app" "`pwd`" 38 | -------------------------------------------------------------------------------- /clone.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Cloning repositories..." 4 | 5 | CODE=$HOME/Code 6 | SITES=$HOME/Herd 7 | BLADE=$CODE/blade-ui-kit 8 | LARAVEL=$CODE/laravel 9 | 10 | # Sites 11 | git clone git@github.com:blade-ui-kit/blade-ui-kit.com.git $SITES/blade-ui-kit.com 12 | git clone git@github.com:laravel/blog.laravel.com.git $SITES/blog.laravel.com 13 | git clone git@github.com:blade-ui-kit/demo.git $SITES/demo.blade-ui-kit.com 14 | git clone git@github.com:driesvints/driesvints.com.git $SITES/driesvints.com 15 | git clone git@github.com:laravel/envoyer.git $SITES/envoyer 16 | git clone git@github.com:eventyio/eventy.io.git $SITES/eventy.io 17 | git clone git@github.com:laravel/forge.git $SITES/forge 18 | git clone git@github.com:fullstackeurope/fullstackeurope.com.git $SITES/fullstackeurope.com 19 | git clone git@github.com:laravel/laravel.com.git $SITES/laravel.com 20 | git clone git@github.com:laravelio/laravel.io.git $SITES/laravel.io 21 | git clone git@github.com:laravelio/paste.laravel.io.git $SITES/paste.laravel.io 22 | git clone git@github.com:laravel/nova.laravel.com.git $SITES/nova 23 | git clone git@github.com:laravel/spark.laravel.com.git $SITES/spark.laravel.com 24 | git clone git@github.com:laravel/vapor.git $SITES/vapor 25 | 26 | # Personal 27 | git clone git@github.com:lmsqueezy/laravel.git $CODE/lmsqueezy-laravel 28 | git clone git@github.com:driesvints/vat-calculator.git $CODE/vat-calculator 29 | 30 | # Blade UI Kit 31 | git clone git@github.com:blade-ui-kit/blade-docs.git $BLADE/blade-docs 32 | git clone git@github.com:blade-ui-kit/blade-heroicons.git $BLADE/blade-heroicons 33 | git clone git@github.com:blade-ui-kit/blade-icons.git $BLADE/blade-icons 34 | git clone git@github.com:blade-ui-kit/blade-ui-kit.git $BLADE/blade-ui-kit 35 | git clone git@github.com:blade-ui-kit/docs.git $BLADE/docs 36 | 37 | # Laravel 38 | git clone git@github.com:laravel/beep.git $LARAVEL/beep 39 | git clone git@github.com:laravel/breeze.git $LARAVEL/breeze 40 | git clone git@github.com:laravel/breeze-next.git $LARAVEL/breeze-next 41 | git clone git@github.com:laravel/browser-kit-testing.git $LARAVEL/browser-kit-testing 42 | git clone git@github.com:laravel/cashier-stripe.git $LARAVEL/cashier-stripe 43 | git clone git@github.com:laravel/cashier-paddle.git $LARAVEL/cashier-paddle 44 | git clone git@github.com:laravel/docs.git $LARAVEL/docs 45 | git clone git@github.com:laravel/dusk.git $LARAVEL/dusk 46 | git clone git@github.com:laravel/echo.git $LARAVEL/echo 47 | git clone git@github.com:laravel/envoy.git $LARAVEL/envoy 48 | git clone git@github.com:laravel/folio.git $LARAVEL/folio 49 | git clone git@github.com:laravel/forge-cli.git $LARAVEL/forge-cli 50 | git clone git@github.com:laravel/forge-sdk.git $LARAVEL/forge-sdk 51 | git clone git@github.com:laravel/fortify.git $LARAVEL/fortify 52 | git clone git@github.com:laravel/framework.git $LARAVEL/framework 53 | git clone git@github.com:laravel/helpers.git $LARAVEL/helpers 54 | git clone git@github.com:laravel/horizon.git $LARAVEL/horizon 55 | git clone git@github.com:laravel/installer.git $LARAVEL/installer 56 | git clone git@github.com:laravel/jetstream.git $LARAVEL/jetstream 57 | git clone git@github.com:laravel/jetstream-docs.git $LARAVEL/jetstream-docs 58 | git clone git@github.com:laravel/laravel.git $LARAVEL/laravel 59 | git clone git@github.com:laravel/legacy-factories.git $LARAVEL/legacy-factories 60 | git clone git@github.com:laravel/lumen.git $LARAVEL/lumen 61 | git clone git@github.com:laravel/lumen-framework.git $LARAVEL/lumen-framework 62 | git clone git@github.com:laravel/nova.git $LARAVEL/nova 63 | git clone git@github.com:laravel/octane.git $LARAVEL/octane 64 | git clone git@github.com:laravel/package-template.git $LARAVEL/package-template 65 | git clone git@github.com:laravel/pail.git $LARAVEL/pail 66 | git clone git@github.com:laravel/passport.git $LARAVEL/passport 67 | git clone git@github.com:laravel/pennant.git $LARAVEL/pennant 68 | git clone git@github.com:laravel/pint.git $LARAVEL/pint 69 | git clone git@github.com:laravel/precognition.git $LARAVEL/precognition 70 | git clone git@github.com:laravel/prompts.git $LARAVEL/prompts 71 | git clone git@github.com:laravel/pulse.git $LARAVEL/pulse 72 | git clone git@github.com:laravel/sail.git $LARAVEL/sail 73 | git clone git@github.com:laravel/sail-server.git $LARAVEL/sail-server 74 | git clone git@github.com:laravel/sanctum.git $LARAVEL/sanctum 75 | git clone git@github.com:laravel/scout.git $LARAVEL/scout 76 | git clone git@github.com:laravel/serializable-closure.git $LARAVEL/serializable-closure 77 | git clone git@github.com:laravel/slack-notification-channel.git $LARAVEL/slack-notification-channel 78 | git clone git@github.com:laravel/socialite.git $LARAVEL/socialite 79 | git clone git@github.com:laravel/spark-next-docs.git $LARAVEL/spark-next-docs 80 | git clone git@github.com:laravel/spark-paddle.git $LARAVEL/spark-paddle 81 | git clone git@github.com:laravel/spark-stripe.git $LARAVEL/spark-stripe 82 | git clone git@github.com:laravel/telescope.git $LARAVEL/telescope 83 | git clone git@github.com:laravel/tinker.git $LARAVEL/tinker 84 | git clone git@github.com:laravel/ui.git $LARAVEL/ui 85 | git clone git@github.com:laravel/valet.git $LARAVEL/valet 86 | git clone git@github.com:laravel/vapor-cli.git $LARAVEL/vapor-cli 87 | git clone git@github.com:laravel/vapor-core.git $LARAVEL/vapor-core 88 | git clone git@github.com:laravel/vapor-ui.git $LARAVEL/vapor-ui 89 | git clone git@github.com:laravel/vite-plugin.git $LARAVEL/vite-plugin 90 | git clone git@github.com:livewire/volt.git $LARAVEL/volt 91 | git clone git@github.com:laravel/vonage-notification-channel.git $LARAVEL/vonage-notification-channel 92 | -------------------------------------------------------------------------------- /fresh.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Setting up your Mac..." 4 | 5 | # Check if Xcode Command Line Tools are installed 6 | if ! xcode-select -p &>/dev/null; then 7 | echo "Xcode Command Line Tools not found. Installing..." 8 | xcode-select --install 9 | else 10 | echo "Xcode Command Line Tools already installed." 11 | fi 12 | 13 | # Check for Oh My Zsh and install if we don't have it 14 | if test ! $(which omz); then 15 | /bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/HEAD/tools/install.sh)" 16 | fi 17 | 18 | # Check for Homebrew and install if we don't have it 19 | if test ! $(which brew); then 20 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 21 | 22 | echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> $HOME/.zprofile 23 | eval "$(/opt/homebrew/bin/brew shellenv)" 24 | fi 25 | 26 | # Removes .zshrc from $HOME (if it exists) and symlinks the .zshrc file from the .dotfiles 27 | rm -rf $HOME/.zshrc 28 | ln -sw $HOME/.dotfiles/.zshrc $HOME/.zshrc 29 | 30 | # Update Homebrew recipes 31 | brew update 32 | 33 | # Install all our dependencies with bundle (See Brewfile) 34 | brew tap homebrew/bundle 35 | brew bundle --file ./Brewfile 36 | 37 | # Set default MySQL root password and auth type 38 | mysql -u root -e "ALTER USER root@localhost IDENTIFIED WITH mysql_native_password BY 'password'; FLUSH PRIVILEGES;" 39 | 40 | # Create a projects directories 41 | mkdir $HOME/Code 42 | mkdir $HOME/Herd 43 | 44 | # Create Code subdirectories 45 | mkdir $HOME/Code/blade-ui-kit 46 | mkdir $HOME/Code/laravel 47 | 48 | # Clone Github repositories 49 | ./clone.sh 50 | 51 | # Symlink the Mackup config file to the home directory 52 | ln -s ./.mackup.cfg $HOME/.mackup.cfg 53 | 54 | # Set macOS preferences - we will run this last because this will reload the shell 55 | source ./.macos 56 | -------------------------------------------------------------------------------- /minimal.zsh-theme: -------------------------------------------------------------------------------- 1 | # Global settings 2 | MNML_OK_COLOR="${MNML_OK_COLOR:-2}" 3 | MNML_ERR_COLOR="${MNML_ERR_COLOR:-1}" 4 | 5 | MNML_USER_CHAR="${MNML_USER_CHAR:-λ}" 6 | MNML_INSERT_CHAR="${MNML_INSERT_CHAR:-›}" 7 | MNML_NORMAL_CHAR="${MNML_NORMAL_CHAR:-·}" 8 | MNML_ELLIPSIS_CHAR="${MNML_ELLIPSIS_CHAR:-..}" 9 | MNML_BGJOB_MODE=${MNML_BGJOB_MODE:-4} 10 | 11 | [ "${+MNML_PROMPT}" -eq 0 ] && MNML_PROMPT=(mnml_ssh mnml_pyenv mnml_status mnml_keymap) 12 | [ "${+MNML_RPROMPT}" -eq 0 ] && MNML_RPROMPT=('mnml_cwd 2 0' mnml_git) 13 | [ "${+MNML_INFOLN}" -eq 0 ] && MNML_INFOLN=(mnml_err mnml_jobs mnml_uhp mnml_files) 14 | 15 | [ "${+MNML_MAGICENTER}" -eq 0 ] && MNML_MAGICENTER=(mnml_me_dirs mnml_me_ls mnml_me_git) 16 | 17 | # Components 18 | function mnml_status { 19 | local okc="$MNML_OK_COLOR" 20 | local errc="$MNML_ERR_COLOR" 21 | local uchar="$MNML_USER_CHAR" 22 | 23 | local job_ansi="0" 24 | if [ -n "$(jobs | sed -n '$=')" ]; then 25 | job_ansi="$MNML_BGJOB_MODE" 26 | fi 27 | 28 | local err_ansi="$MNML_OK_COLOR" 29 | if [ "$MNML_LAST_ERR" != "0" ]; then 30 | err_ansi="$MNML_ERR_COLOR" 31 | fi 32 | 33 | printf '%b' "%{\e[$job_ansi;3${err_ansi}m%}%(!.#.$uchar)%{\e[0m%}" 34 | } 35 | 36 | function mnml_keymap { 37 | local kmstat="$MNML_INSERT_CHAR" 38 | [ "$KEYMAP" = 'vicmd' ] && kmstat="$MNML_NORMAL_CHAR" 39 | printf '%b' "$kmstat" 40 | } 41 | 42 | function mnml_cwd { 43 | local echar="$MNML_ELLIPSIS_CHAR" 44 | local segments="${1:-2}" 45 | local seg_len="${2:-0}" 46 | 47 | local _w="%{\e[0m%}" 48 | local _g="%{\e[38;5;244m%}" 49 | 50 | if [ "$segments" -le 0 ]; then 51 | segments=0 52 | fi 53 | if [ "$seg_len" -gt 0 ] && [ "$seg_len" -lt 4 ]; then 54 | seg_len=4 55 | fi 56 | local seg_hlen=$((seg_len / 2 - 1)) 57 | 58 | local cwd="%${segments}~" 59 | cwd="${(%)cwd}" 60 | cwd=("${(@s:/:)cwd}") 61 | 62 | local pi="" 63 | for i in {1..${#cwd}}; do 64 | pi="$cwd[$i]" 65 | if [ "$seg_len" -gt 0 ] && [ "${#pi}" -gt "$seg_len" ]; then 66 | cwd[$i]="${pi:0:$seg_hlen}$_w$echar$_g${pi: -$seg_hlen}" 67 | fi 68 | done 69 | 70 | printf '%b' "$_g${(j:/:)cwd//\//$_w/$_g}$_w" 71 | } 72 | 73 | function mnml_git { 74 | local statc="%{\e[0;3${MNML_OK_COLOR}m%}" # assume clean 75 | local bname="$(git rev-parse --abbrev-ref HEAD 2> /dev/null)" 76 | 77 | if [ -n "$bname" ]; then 78 | if [ -n "$(git status --porcelain 2> /dev/null)" ]; then 79 | statc="%{\e[0;3${MNML_ERR_COLOR}m%}" 80 | fi 81 | printf '%b' "$statc$bname%{\e[0m%}" 82 | fi 83 | } 84 | 85 | function mnml_hg { 86 | local statc="%{\e[0;3${MNML_OK_COLOR}m%}" # assume clean 87 | local bname="$(hg branch 2> /dev/null)" 88 | if [ -n "$bname" ]; then 89 | if [ -n "$(hg status 2> /dev/null)" ]; then 90 | statc="%{\e[0;3${MNML_ERR_COLOR}m%}" 91 | fi 92 | printf '%b' "$statc$bname%{\e[0m%}" 93 | fi 94 | } 95 | 96 | function mnml_hg_no_color { 97 | # Assume branch name is clean 98 | local statc="%{\e[0;3${MNML_OK_COLOR}m%}" 99 | local bname="" 100 | # Defines path as current directory 101 | local current_dir=$PWD 102 | # While current path is not root path 103 | while [[ $current_dir != '/' ]] 104 | do 105 | if [[ -d "${current_dir}/.hg" ]] 106 | then 107 | if [[ -f "$current_dir/.hg/branch" ]] 108 | then 109 | bname=$(<"$current_dir/.hg/branch") 110 | else 111 | bname="default" 112 | fi 113 | printf '%b' "$statc$bname%{\e[0m%}" 114 | return; 115 | fi 116 | # Defines path as parent directory and keeps looking for :) 117 | current_dir="${current_dir:h}" 118 | done 119 | } 120 | 121 | function mnml_uhp { 122 | local _w="%{\e[0m%}" 123 | local _g="%{\e[38;5;244m%}" 124 | local cwd="%~" 125 | cwd="${(%)cwd}" 126 | 127 | printf '%b' "$_g%n$_w@$_g%m$_w:$_g${cwd//\//$_w/$_g}$_w" 128 | } 129 | 130 | function mnml_ssh { 131 | if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then 132 | printf '%b' "$(hostname -s)" 133 | fi 134 | } 135 | 136 | function mnml_pyenv { 137 | if [ -n "$VIRTUAL_ENV" ]; then 138 | _venv="$(basename $VIRTUAL_ENV)" 139 | printf '%b' "${_venv%%.*}" 140 | fi 141 | } 142 | 143 | function mnml_err { 144 | local _w="%{\e[0m%}" 145 | local _err="%{\e[3${MNML_ERR_COLOR}m%}" 146 | 147 | if [ "${MNML_LAST_ERR:-0}" != "0" ]; then 148 | printf '%b' "$_err$MNML_LAST_ERR$_w" 149 | fi 150 | } 151 | 152 | function mnml_jobs { 153 | local _w="%{\e[0m%}" 154 | local _g="%{\e[38;5;244m%}" 155 | 156 | local job_n="$(jobs | sed -n '$=')" 157 | if [ "$job_n" -gt 0 ]; then 158 | printf '%b' "$_g$job_n$_w&" 159 | fi 160 | } 161 | 162 | function mnml_files { 163 | local _ls="$(env which ls)" 164 | local _w="%{\e[0m%}" 165 | local _g="%{\e[38;5;244m%}" 166 | 167 | local a_files="$($_ls -1A | sed -n '$=')" 168 | local v_files="$($_ls -1 | sed -n '$=')" 169 | local h_files="$((a_files - v_files))" 170 | 171 | local output="${_w}[$_g${v_files:-0}" 172 | if [ "${h_files:-0}" -gt 0 ]; then 173 | output="$output $_w($_g$h_files$_w)" 174 | fi 175 | output="$output${_w}]" 176 | 177 | printf '%b' "$output" 178 | } 179 | 180 | # Magic enter functions 181 | function mnml_me_dirs { 182 | local _w="\e[0m" 183 | local _g="\e[38;5;244m" 184 | 185 | if [ "$(dirs -p | sed -n '$=')" -gt 1 ]; then 186 | local stack="$(dirs)" 187 | echo "$_g${stack//\//$_w/$_g}$_w" 188 | fi 189 | } 190 | 191 | function mnml_me_ls { 192 | if [ "$(uname)" = "Darwin" ] && ! ls --version &> /dev/null; then 193 | COLUMNS=$COLUMNS CLICOLOR_FORCE=1 ls -C -G -F 194 | else 195 | env ls -C -F --color="always" -w $COLUMNS 196 | fi 197 | } 198 | 199 | function mnml_me_git { 200 | git -c color.status=always status -sb 2> /dev/null 201 | } 202 | 203 | # Wrappers & utils 204 | # join outpus of components 205 | function _mnml_wrap { 206 | local -a arr 207 | arr=() 208 | local cmd_out="" 209 | local cmd 210 | for cmd in ${(P)1}; do 211 | cmd_out="$(eval "$cmd")" 212 | if [ -n "$cmd_out" ]; then 213 | arr+="$cmd_out" 214 | fi 215 | done 216 | 217 | printf '%b' "${(j: :)arr}" 218 | } 219 | 220 | # expand string as prompt would do 221 | function _mnml_iline { 222 | echo "${(%)1}" 223 | } 224 | 225 | # display magic enter 226 | function _mnml_me { 227 | local -a output 228 | output=() 229 | local cmd_out="" 230 | local cmd 231 | for cmd in $MNML_MAGICENTER; do 232 | cmd_out="$(eval "$cmd")" 233 | if [ -n "$cmd_out" ]; then 234 | output+="$cmd_out" 235 | fi 236 | done 237 | printf '%b' "${(j:\n:)output}" | less -XFR 238 | } 239 | 240 | # capture exit status and reset prompt 241 | function _mnml_zle-line-init { 242 | MNML_LAST_ERR="$?" # I need to capture this ASAP 243 | zle reset-prompt 244 | } 245 | 246 | # redraw prompt on keymap select 247 | function _mnml_zle-keymap-select { 248 | zle reset-prompt 249 | } 250 | 251 | # draw infoline if no command is given 252 | function _mnml_buffer-empty { 253 | if [ -z "$BUFFER" ]; then 254 | _mnml_iline "$(_mnml_wrap MNML_INFOLN)" 255 | _mnml_me 256 | zle redisplay 257 | else 258 | zle accept-line 259 | fi 260 | } 261 | 262 | # properly bind widgets 263 | # see: https://github.com/zsh-users/zsh-syntax-highlighting/blob/1f1e629290773bd6f9673f364303219d6da11129/zsh-syntax-highlighting.zsh#L292-L356 264 | function _mnml_bind_widgets() { 265 | zmodload zsh/zleparameter 266 | 267 | local -a to_bind 268 | to_bind=(zle-line-init zle-keymap-select buffer-empty) 269 | 270 | typeset -F SECONDS 271 | local zle_wprefix=s$SECONDS-r$RANDOM 272 | 273 | local cur_widget 274 | for cur_widget in $to_bind; do 275 | case "${widgets[$cur_widget]:-""}" in 276 | user:_mnml_*);; 277 | user:*) 278 | zle -N $zle_wprefix-$cur_widget ${widgets[$cur_widget]#*:} 279 | eval "_mnml_ww_${(q)zle_wprefix}-${(q)cur_widget}() { _mnml_${(q)cur_widget}; zle ${(q)zle_wprefix}-${(q)cur_widget} }" 280 | zle -N $cur_widget _mnml_ww_$zle_wprefix-$cur_widget 281 | ;; 282 | *) 283 | zle -N $cur_widget _mnml_$cur_widget 284 | ;; 285 | esac 286 | done 287 | } 288 | 289 | # Setup 290 | autoload -U colors && colors 291 | setopt prompt_subst 292 | 293 | PROMPT='$(_mnml_wrap MNML_PROMPT) ' 294 | RPROMPT='$(_mnml_wrap MNML_RPROMPT)' 295 | 296 | _mnml_bind_widgets 297 | 298 | bindkey -M main "^M" buffer-empty 299 | bindkey -M vicmd "^M" buffer-empty 300 | -------------------------------------------------------------------------------- /path.zsh: -------------------------------------------------------------------------------- 1 | # Add directories to the PATH and prevent to add the same directory multiple times upon shell reload. 2 | add_to_path() { 3 | if [[ -d "$1" ]] && [[ ":$PATH:" != *":$1:"* ]]; then 4 | export PATH="$1:$PATH" 5 | fi 6 | } 7 | 8 | # Load dotfiles binaries 9 | add_to_path "$DOTFILES/bin" 10 | 11 | # Load global Composer tools 12 | add_to_path "$HOME/.composer/vendor/bin" 13 | 14 | # Load global Node installed binaries 15 | add_to_path "$HOME/.node/bin" 16 | 17 | # Use project specific binaries before global ones 18 | add_to_path "vendor/bin" 19 | add_to_path "node_modules/.bin" 20 | -------------------------------------------------------------------------------- /ssh.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Generating a new SSH key for GitHub..." 4 | 5 | # Generating a new SSH key 6 | # https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key 7 | ssh-keygen -t ed25519 -C $1 -f ~/.ssh/id_ed25519 8 | 9 | # Adding your SSH key to the ssh-agent 10 | # https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent 11 | eval "$(ssh-agent -s)" 12 | 13 | touch ~/.ssh/config 14 | echo "Host *\n AddKeysToAgent yes\n UseKeychain yes\n IdentityFile ~/.ssh/id_ed25519" | tee ~/.ssh/config 15 | 16 | ssh-add -K ~/.ssh/id_ed25519 17 | 18 | # Adding your SSH key to your GitHub account 19 | # https://docs.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account 20 | echo "run 'pbcopy < ~/.ssh/id_ed25519.pub' and paste that into GitHub" 21 | --------------------------------------------------------------------------------