diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..d63bf12b3 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,4 @@ +# These are supported funding model platforms + +github: driesvints +custom: ["https://www.paypal.me/driesvints"] diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..21becb578 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "plugins/artisan"] + path = plugins/artisan + url = git@github.com:jessarcher/zsh-artisan.git diff --git a/.macos b/.macos index aeefa3754..8854534f8 100644 --- a/.macos +++ b/.macos @@ -1,6 +1,11 @@ #!/usr/bin/env bash -# Thanks to Mathias Bynens! https://mths.be/macos +# Thanks to Mathias Bynens! +# ~/.macos — https://mths.be/macos + +# Close any open System Preferences panes, to prevent them from overriding +# settings we’re about to change +osascript -e 'tell application "System Preferences" to quit' # Ask for the administrator password upfront sudo -v @@ -12,18 +17,49 @@ while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & # General UI/UX # ############################################################################### -# Set standby delay to 24 hours (default is 1 hour) -sudo pmset -a standbydelay 86400 +# Set computer name (as done via System Preferences → Sharing) +sudo scutil --set ComputerName "ion Larry" +sudo scutil --set HostName "ion Larry" +sudo scutil --set LocalHostName "ion Larry" +sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "ion Larry" # Disable the sound effects on boot sudo nvram SystemAudioVolume=" " +# Disable transparency in the menu bar and elsewhere on Yosemite +# defaults write com.apple.universalaccess reduceTransparency -bool true + +# Set highlight color to green +# defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600" + # Set sidebar icon size to medium defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2 +# Always show scrollbars +# defaults write NSGlobalDomain AppleShowScrollBars -string "Always" +# Possible values: `WhenScrolling`, `Automatic` and `Always` + +# Disable the over-the-top focus ring animation +# defaults write NSGlobalDomain NSUseAnimatedFocusRing -bool false + +# Disable smooth scrolling +# (Uncomment if you’re on an older Mac that messes up the animation) +#defaults write NSGlobalDomain NSScrollAnimationEnabled -bool false + # Increase window resize speed for Cocoa applications defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 +# Expand save panel by default +defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true +defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true + +# Expand print panel by default +defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true +defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true + +# Save to disk (not to iCloud) by default +# defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false + # Automatically quit printer app once the print jobs complete defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true @@ -31,28 +67,95 @@ defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true defaults write com.apple.LaunchServices LSQuarantine -bool false # Remove duplicates in the “Open With” menu (also see `lscleanup` alias) -/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user +# /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user + +# Display ASCII control characters using caret notation in standard text views +# Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt` +defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true + +# Disable Resume system-wide +# defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false + +# Disable automatic termination of inactive apps +# defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true + +# Disable the crash reporter +#defaults write com.apple.CrashReporter DialogType -string "none" + +# Set Help Viewer windows to non-floating mode +defaults write com.apple.helpviewer DevMode -bool true + +# Fix for the ancient UTF-8 bug in QuickLook (https://mths.be/bbo) +# Commented out, as this is known to cause problems in various Adobe apps :( +# See https://github.com/mathiasbynens/dotfiles/issues/237 +#echo "0x08000100:0" > ~/.CFUserTextEncoding # Reveal IP address, hostname, OS version, etc. when clicking the clock # in the login window sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName -# Check for software updates daily, not just once per week -defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 +# Disable Notification Center and remove the menu bar icon +# launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null -# Disable smart quotes as they’re annoying when typing code -defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false +# Disable automatic capitalization as it’s annoying when typing code +# defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false # Disable smart dashes as they’re annoying when typing code defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false +# Disable automatic period substitution as it’s annoying when typing code +# defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false + +# Disable smart quotes as they’re annoying when typing code +defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false + +# Disable auto-correct +defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false + +# Set a custom wallpaper image. `DefaultDesktop.jpg` is already a symlink, and +# all wallpapers are in `/Library/Desktop Pictures/`. The default is `Wave.jpg`. +#rm -rf ~/Library/Application Support/Dock/desktoppicture.db +#sudo rm -rf /System/Library/CoreServices/DefaultDesktop.jpg +#sudo ln -s /path/to/your/image /System/Library/CoreServices/DefaultDesktop.jpg + ############################################################################### # Trackpad, mouse, keyboard, Bluetooth accessories, and input # ############################################################################### +# Trackpad: enable tap to click for this user and for the login screen +# defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true +# defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 +# defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 + +# Trackpad: map bottom right corner to right-click +# defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2 +# defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true +# defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1 +# defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true + +# Disable “natural” (Lion-style) scrolling +# defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false + # Increase sound quality for Bluetooth headphones/headsets defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40 +# Enable full keyboard access for all controls +# (e.g. enable Tab in modal dialogs) +defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 + +# Use scroll gesture with the Ctrl (^) modifier key to zoom +# defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true +# defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144 +# Follow the keyboard focus while zoomed in +# defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true + +# Disable press-and-hold for keys in favor of key repeat +# defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false + +# Set a blazingly fast keyboard repeat rate +# defaults write NSGlobalDomain KeyRepeat -int 1 +# defaults write NSGlobalDomain InitialKeyRepeat -int 10 + # Set language and text formats # Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with # `Inches`, `en_GB` with `en_US`, and `true` with `false`. @@ -61,53 +164,173 @@ defaults write NSGlobalDomain AppleLocale -string "en_US@currency=USD" defaults write NSGlobalDomain AppleMeasurementUnits -string "Inches" defaults write NSGlobalDomain AppleMetricUnits -bool false +# Show language menu in the top right corner of the boot screen +# sudo defaults write /Library/Preferences/com.apple.loginwindow showInputMenu -bool true + # Set the timezone; see `sudo systemsetup -listtimezones` for other values sudo systemsetup -settimezone "America/Chicago" > /dev/null -# Disable auto-correct -defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false +# Stop iTunes from responding to the keyboard media keys +#launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null + +############################################################################### +# Energy saving # +############################################################################### + +# Enable lid wakeup +sudo pmset -a lidwake 1 + +# Restart automatically on power loss +sudo pmset -a autorestart 1 + +# Restart automatically if the computer freezes +sudo systemsetup -setrestartfreeze on + +# Sleep the display after 15 minutes +sudo pmset -a displaysleep 15 + +# Disable machine sleep while charging +sudo pmset -c sleep 0 + +# Set machine sleep to 5 minutes on battery +sudo pmset -b sleep 5 + +# Set standby delay to 24 hours (default is 1 hour) +sudo pmset -a standbydelay 86400 + +# Never go into computer sleep mode +sudo systemsetup -setcomputersleep Off > /dev/null + +# Hibernation mode +# 0: Disable hibernation (speeds up entering sleep mode) +# 3: Copy RAM to disk so the system state can still be restored in case of a +# power failure. +sudo pmset -a hibernatemode 0 + +# Remove the sleep image file to save disk space +# sudo rm /private/var/vm/sleepimage +# Create a zero-byte file instead… +# sudo touch /private/var/vm/sleepimage +# …and make sure it can’t be rewritten +# sudo chflags uchg /private/var/vm/sleepimage ############################################################################### # Screen # ############################################################################### +# Re-enable subpixel antialiasing +defaults write -g CGFontRenderingFontSmoothingDisabled -bool FALSE + # Require password immediately after sleep or screen saver begins defaults write com.apple.screensaver askForPassword -int 1 defaults write com.apple.screensaver askForPasswordDelay -int 0 +# Save screenshots to the desktop +# defaults write com.apple.screencapture location -string "${HOME}/Desktop" + +# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF) +# defaults write com.apple.screencapture type -string "png" + +# Disable shadow in screenshots +# defaults write com.apple.screencapture disable-shadow -bool true + +# Enable subpixel font rendering on non-Apple LCDs +# Reference: https://github.com/kevinSuttle/macOS-Defaults/issues/17#issuecomment-266633501 +defaults write NSGlobalDomain AppleFontSmoothing -int 1 + +# Enable HiDPI display modes (requires restart) +# sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true + ############################################################################### # Finder # ############################################################################### +# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons +# defaults write com.apple.finder QuitMenuItem -bool true + # Finder: disable window animations and Get Info animations defaults write com.apple.finder DisableAllAnimations -bool true +# Set Desktop as the default location for new Finder windows +# For other paths, use `PfLo` and `file:///full/path/here/` +# defaults write com.apple.finder NewWindowTarget -string "PfDe" +# defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Desktop/" + +# Show icons for hard drives, servers, and removable media on the desktop +# defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true +# defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true +# defaults write com.apple.finder ShowMountedServersOnDesktop -bool true +# defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true + +# Finder: show hidden files by default +#defaults write com.apple.finder AppleShowAllFiles -bool true + +# Finder: show all filename extensions +# defaults write NSGlobalDomain AppleShowAllExtensions -bool true + +# Finder: show status bar +# defaults write com.apple.finder ShowStatusBar -bool true + # Finder: show path bar defaults write com.apple.finder ShowPathbar -bool true +# Display full POSIX path as Finder window title +# defaults write com.apple.finder _FXShowPosixPathInTitle -bool true + +# Keep folders on top when sorting by name +defaults write com.apple.finder _FXSortFoldersFirst -bool true + # When performing a search, search the current folder by default defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" # Disable the warning when changing a file extension defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false +# Enable spring loading for directories +# defaults write NSGlobalDomain com.apple.springing.enabled -bool true + +# Remove the spring loading delay for directories +# defaults write NSGlobalDomain com.apple.springing.delay -float 0 + +# Avoid creating .DS_Store files on network or USB volumes +defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true +defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true + +# Disable disk image verification +# defaults write com.apple.frameworks.diskimages skip-verify -bool true +# defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true +# defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true + +# Automatically open a new Finder window when a volume is mounted +# defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true +# defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true +# defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true + +# Show item info near icons on the desktop and in other icon views +# /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist +# /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist +# /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist + +# Show item info to the right of the icons on the desktop +# /usr/libexec/PlistBuddy -c "Set DesktopViewSettings:IconViewSettings:labelOnBottom false" ~/Library/Preferences/com.apple.finder.plist + # Enable snap-to-grid for icons on the desktop and in other icon views -/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" $HOME/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" $HOME/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" $HOME/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist # Increase grid spacing for icons on the desktop and in other icon views -/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 100" $HOME/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100" $HOME/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 100" $HOME/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist # Increase the size of icons on the desktop and in other icon views -/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 80" $HOME/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:iconSize 80" $HOME/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:iconSize 80" $HOME/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist # Use list view in all Finder windows by default -# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv` +# Four-letter codes for the other view modes: `icnv`, `clmv`, `glyv` defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" # Disable the warning before emptying the Trash @@ -117,7 +340,14 @@ defaults write com.apple.finder WarnOnEmptyTrash -bool false defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true # Show the ~/Library folder -chflags nohidden $HOME/Library +chflags nohidden ~/Library && xattr -d com.apple.FinderInfo ~/Library + +# Show the /Volumes folder +# sudo chflags nohidden /Volumes + +# Remove Dropbox’s green checkmark icons in Finder +# file=/Applications/Dropbox.app/Contents/Resources/emblem-dropbox-uptodate.icns +# [ -e "${file}" ] && mv -f "${file}" "${file}.bak" # Expand the following File Info panes: # “General”, “Open with”, and “Sharing & Permissions” @@ -126,25 +356,28 @@ defaults write com.apple.finder FXInfoPanesExpanded -dict \ OpenWith -bool true \ Privileges -bool true -# Auto hide menu bar -defaults write NSGlobalDomain _HIHideMenuBar -bool true - ############################################################################### # Dock, Dashboard, and hot corners # ############################################################################### -# Dark menu bar and dock -defaults write $HOME/Library/Preferences/.GlobalPreferences.plist AppleInterfaceTheme -string "Dark" - # Enable highlight hover effect for the grid view of a stack (Dock) defaults write com.apple.dock mouse-over-hilite-stack -bool true +# Set the icon size of Dock items to 36 pixels +# defaults write com.apple.dock tilesize -int 36 + # Change minimize/maximize window effect defaults write com.apple.dock mineffect -string "scale" # Minimize windows into their application’s icon defaults write com.apple.dock minimize-to-application -bool true +# Enable spring loading for all Dock items +# defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true + +# Show indicator lights for open applications in the Dock +# defaults write com.apple.dock show-process-indicators -bool true + # Wipe all (default) app icons from the Dock # This is only really useful when setting up a new Mac, or if you don’t use # the Dock to launch apps. @@ -153,8 +386,15 @@ defaults write com.apple.dock persistent-apps -array # Show only open applications in the Dock defaults write com.apple.dock static-only -bool true -# Group windows by application in Mission Control -defaults write com.apple.dock expose-group-by-app -bool true +# Don’t animate opening applications from the Dock +defaults write com.apple.dock launchanim -bool false + +# Speed up Mission Control animations +# defaults write com.apple.dock expose-animation-duration -float 0.1 + +# Don’t group windows by application in Mission Control +# (i.e. use the old Exposé behavior instead) +# defaults write com.apple.dock expose-group-by-app -bool false # Disable Dashboard defaults write com.apple.dashboard mcx-disabled -bool true @@ -162,19 +402,38 @@ defaults write com.apple.dashboard mcx-disabled -bool true # Don’t show Dashboard as a Space defaults write com.apple.dock dashboard-in-overlay -bool true +# Don’t automatically rearrange Spaces based on most recent use +defaults write com.apple.dock mru-spaces -bool false + # Remove the auto-hiding Dock delay defaults write com.apple.dock autohide-delay -float 0 - # Remove the animation when hiding/showing the Dock defaults write com.apple.dock autohide-time-modifier -float 0 # Automatically hide and show the Dock defaults write com.apple.dock autohide -bool true +# Make Dock icons of hidden applications translucent +defaults write com.apple.dock showhidden -bool true + +# Don’t show recent applications in Dock +defaults write com.apple.dock show-recents -bool false + +# Disable the Launchpad gesture (pinch with thumb and three fingers) +#defaults write com.apple.dock showLaunchpadGestureEnabled -int 0 + +# Reset Launchpad, but keep the desktop wallpaper intact +find "${HOME}/Library/Application Support/Dock" -name "*-*.db" -maxdepth 1 -delete + # Add iOS & Watch Simulator to Launchpad sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app" "/Applications/Simulator.app" sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator (Watch).app" "/Applications/Simulator (Watch).app" +# Add a spacer to the left side of the Dock (where the applications are) +#defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}' +# Add a spacer to the right side of the Dock (where the Trash is) +#defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}' + # Hot corners # Possible values: # 0: no-op @@ -187,18 +446,16 @@ sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator ( # 10: Put display to sleep # 11: Launchpad # 12: Notification Center +# 13: Lock Screen # Top left screen corner → Mission Control # defaults write com.apple.dock wvous-tl-corner -int 2 # defaults write com.apple.dock wvous-tl-modifier -int 0 -# Top right screen corner → Put display to sleep +# Top right screen corner → Desktop defaults write com.apple.dock wvous-tr-corner -int 10 defaults write com.apple.dock wvous-tr-modifier -int 0 # Bottom left screen corner → Start screen saver # defaults write com.apple.dock wvous-bl-corner -int 5 # defaults write com.apple.dock wvous-bl-modifier -int 0 -# Bottom right screen corner → Launchpad -defaults write com.apple.dock wvous-br-corner -int 11 -defaults write com.apple.dock wvous-br-modifier -int 0 ############################################################################### # Safari & WebKit # @@ -208,6 +465,87 @@ defaults write com.apple.dock wvous-br-modifier -int 0 defaults write com.apple.Safari UniversalSearchEnabled -bool false defaults write com.apple.Safari SuppressSearchSuggestions -bool true +# Press Tab to highlight each item on a web page +# defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true +# defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true + +# Show the full URL in the address bar (note: this still hides the scheme) +defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true + +# Set Safari’s home page to `about:blank` for faster loading +# defaults write com.apple.Safari HomePage -string "about:blank" + +# Prevent Safari from opening ‘safe’ files automatically after downloading +# defaults write com.apple.Safari AutoOpenSafeDownloads -bool false + +# Allow hitting the Backspace key to go to the previous page in history +# defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true + +# Hide Safari’s bookmarks bar by default +# defaults write com.apple.Safari ShowFavoritesBar -bool false + +# Hide Safari’s sidebar in Top Sites +# defaults write com.apple.Safari ShowSidebarInTopSites -bool false + +# Disable Safari’s thumbnail cache for History and Top Sites +# defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2 + +# Enable Safari’s debug menu +# defaults write com.apple.Safari IncludeInternalDebugMenu -bool true + +# Make Safari’s search banners default to Contains instead of Starts With +# defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false + +# Remove useless icons from Safari’s bookmarks bar +# defaults write com.apple.Safari ProxiesInBookmarksBar "()" + +# Enable the Develop menu and the Web Inspector in Safari +defaults write com.apple.Safari IncludeDevelopMenu -bool true +defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true +defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true + +# Add a context menu item for showing the Web Inspector in web views +# defaults write NSGlobalDomain WebKitDeveloperExtras -bool true + +# Enable continuous spellchecking +# defaults write com.apple.Safari WebContinuousSpellCheckingEnabled -bool true +# Disable auto-correct +# defaults write com.apple.Safari WebAutomaticSpellingCorrectionEnabled -bool false + +# Disable AutoFill +# defaults write com.apple.Safari AutoFillFromAddressBook -bool false +# defaults write com.apple.Safari AutoFillPasswords -bool false +# defaults write com.apple.Safari AutoFillCreditCardData -bool false +# defaults write com.apple.Safari AutoFillMiscellaneousForms -bool false + +# Warn about fraudulent websites +defaults write com.apple.Safari WarnAboutFraudulentWebsites -bool true + +# Disable plug-ins +# defaults write com.apple.Safari WebKitPluginsEnabled -bool false +# defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2PluginsEnabled -bool false + +# Disable Java +# defaults write com.apple.Safari WebKitJavaEnabled -bool false +# defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabled -bool false +# defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabledForLocalFiles -bool false + +# Block pop-up windows +# defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically -bool false +# defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically -bool false + +# Disable auto-playing video +#defaults write com.apple.Safari WebKitMediaPlaybackAllowsInline -bool false +#defaults write com.apple.SafariTechnologyPreview WebKitMediaPlaybackAllowsInline -bool false +#defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback -bool false +#defaults write com.apple.SafariTechnologyPreview com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback -bool false + +# Enable “Do Not Track” +# defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true + +# Update extensions automatically +defaults write com.apple.Safari InstallExtensionUpdatesAutomatically -bool true + ############################################################################### # Mail # ############################################################################### @@ -219,12 +557,68 @@ defaults write com.apple.mail DisableSendAnimations -bool true # Copy email addresses as `foo@example.com` instead of `Foo Bar ` in Mail.app defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false +# Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app +# defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@\U21a9" + +# Display emails in threaded mode, sorted by date (oldest at the top) +# defaults write com.apple.mail DraftsViewerAttributes -dict-add "DisplayInThreadedMode" -string "yes" +# defaults write com.apple.mail DraftsViewerAttributes -dict-add "SortedDescending" -string "yes" +# defaults write com.apple.mail DraftsViewerAttributes -dict-add "SortOrder" -string "received-date" + # Disable inline attachments (just show the icons) defaults write com.apple.mail DisableInlineAttachmentViewing -bool true # Disable automatic spell checking defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnabled" +############################################################################### +# Spotlight # +############################################################################### + +# Hide Spotlight tray-icon (and subsequent helper) +#sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search +# Disable Spotlight indexing for any volume that gets mounted and has not yet +# been indexed before. +# Use `sudo mdutil -i off "/Volumes/foo"` to stop indexing any volume. +# sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes" +# Change indexing order and disable some search results +# Yosemite-specific search results (remove them if you are using macOS 10.9 or older): +# MENU_DEFINITION +# MENU_CONVERSION +# MENU_EXPRESSION +# MENU_SPOTLIGHT_SUGGESTIONS (send search queries to Apple) +# MENU_WEBSEARCH (send search queries to Apple) +# MENU_OTHER +# defaults write com.apple.spotlight orderedItems -array \ +# '{"enabled" = 1;"name" = "APPLICATIONS";}' \ +# '{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \ +# '{"enabled" = 1;"name" = "DIRECTORIES";}' \ +# '{"enabled" = 1;"name" = "PDF";}' \ +# '{"enabled" = 1;"name" = "FONTS";}' \ +# '{"enabled" = 0;"name" = "DOCUMENTS";}' \ +# '{"enabled" = 0;"name" = "MESSAGES";}' \ +# '{"enabled" = 0;"name" = "CONTACT";}' \ +# '{"enabled" = 0;"name" = "EVENT_TODO";}' \ +# '{"enabled" = 0;"name" = "IMAGES";}' \ +# '{"enabled" = 0;"name" = "BOOKMARKS";}' \ +# '{"enabled" = 0;"name" = "MUSIC";}' \ +# '{"enabled" = 0;"name" = "MOVIES";}' \ +# '{"enabled" = 0;"name" = "PRESENTATIONS";}' \ +# '{"enabled" = 0;"name" = "SPREADSHEETS";}' \ +# '{"enabled" = 0;"name" = "SOURCE";}' \ +# '{"enabled" = 0;"name" = "MENU_DEFINITION";}' \ +# '{"enabled" = 0;"name" = "MENU_OTHER";}' \ +# '{"enabled" = 0;"name" = "MENU_CONVERSION";}' \ +# '{"enabled" = 0;"name" = "MENU_EXPRESSION";}' \ +# '{"enabled" = 0;"name" = "MENU_WEBSEARCH";}' \ +# '{"enabled" = 0;"name" = "MENU_SPOTLIGHT_SUGGESTIONS";}' +# Load new settings before rebuilding the index +# killall mds > /dev/null 2>&1 +# Make sure indexing is enabled for the main volume +# sudo mdutil -i on / > /dev/null +# Rebuild the index from scratch +# sudo mdutil -E / > /dev/null + ############################################################################### # Terminal & iTerm 2 # ############################################################################### @@ -232,6 +626,68 @@ defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnab # Only use UTF-8 in Terminal.app defaults write com.apple.terminal StringEncodings -array 4 +# Use a modified version of the Solarized Dark theme by default in Terminal.app +# osascript < /dev/null && sudo tmutil disablelocal + ############################################################################### # Activity Monitor # ############################################################################### @@ -263,11 +722,20 @@ defaults write com.apple.ActivityMonitor SortDirection -int 0 # Address Book, Dashboard, iCal, TextEdit, and Disk Utility # ############################################################################### +# Enable the debug menu in Address Book +# defaults write com.apple.addressbook ABShowDebugMenu -bool true + +# Enable Dashboard dev mode (allows keeping widgets on the desktop) +# defaults write com.apple.dashboard devmode -bool true + +# Enable the debug menu in iCal (pre-10.8) +# defaults write com.apple.iCal IncludeDebugMenu -bool true + # Use plain text mode for new TextEdit documents -defaults write com.apple.TextEdit RichText -int 0 +# defaults write com.apple.TextEdit RichText -int 0 # Open and save files as UTF-8 in TextEdit -defaults write com.apple.TextEdit PlainTextEncoding -int 4 -defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4 +# defaults write com.apple.TextEdit PlainTextEncoding -int 4 +# defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4 # Show 24 hours a day defaults write com.apple.ical "number of hours displayed" 12 @@ -277,13 +745,43 @@ defaults write com.apple.ical "first day of the week" 1 # Day starts at 9AM defaults write com.apple.ical "first minute of work hours" 480 +# Enable the debug menu in Disk Utility +# defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true +# defaults write com.apple.DiskUtility advanced-image-options -bool true + +# Auto-play videos when opened with QuickTime Player +# defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen -bool true ############################################################################### -# Date & Time # +# Mac App Store # ############################################################################### -# Custom DateFormat -defaults write com.apple.menuextra.clock DateFormat "EEE MMM d H:mm" +# Enable the WebKit Developer Tools in the Mac App Store +defaults write com.apple.appstore WebKitDeveloperExtras -bool true + +# Enable Debug Menu in the Mac App Store +# defaults write com.apple.appstore ShowDebugMenu -bool true + +# Enable the automatic update check +defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true + +# Check for software updates daily, not just once per week +defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 + +# Download newly available updates in background +defaults write com.apple.SoftwareUpdate AutomaticDownload -int 1 + +# Install System data files & security updates +defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 1 + +# Automatically download apps purchased on other Macs +# defaults write com.apple.SoftwareUpdate ConfigDataInstall -int 1 + +# Turn on app auto-update +defaults write com.apple.commerce AutoUpdate -bool true + +# Allow the App Store to reboot machine on macOS updates +# defaults write com.apple.commerce AutoUpdateRestartRequired -bool true ############################################################################### # Photos # @@ -292,16 +790,156 @@ defaults write com.apple.menuextra.clock DateFormat "EEE MMM d H:mm" # Prevent Photos from opening automatically when devices are plugged in defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true +############################################################################### +# Messages # +############################################################################### + +# Disable automatic emoji substitution (i.e. use plain text smileys) +# defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticEmojiSubstitutionEnablediMessage" -bool false + +# Disable smart quotes as it’s annoying for messages that contain code +# defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false + +# Disable continuous spell checking +# defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false + +############################################################################### +# Google Chrome & Google Chrome Canary # +############################################################################### + +# Disable the all too sensitive backswipe on trackpads +# defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false +# defaults write com.google.Chrome.canary AppleEnableSwipeNavigateWithScrolls -bool false + +# Disable the all too sensitive backswipe on Magic Mouse +# defaults write com.google.Chrome AppleEnableMouseSwipeNavigateWithScrolls -bool false +# defaults write com.google.Chrome.canary AppleEnableMouseSwipeNavigateWithScrolls -bool false + +# Use the system-native print preview dialog +# defaults write com.google.Chrome DisablePrintPreview -bool true +# defaults write com.google.Chrome.canary DisablePrintPreview -bool true + +# Expand the print dialog by default +defaults write com.google.Chrome PMPrintingExpandedStateForPrint2 -bool true +defaults write com.google.Chrome.canary PMPrintingExpandedStateForPrint2 -bool true + +############################################################################### +# Opera & Opera Developer # +############################################################################### + +# Expand the print dialog by default +# defaults write com.operasoftware.Opera PMPrintingExpandedStateForPrint2 -boolean true +# defaults write com.operasoftware.OperaDeveloper PMPrintingExpandedStateForPrint2 -boolean true + +############################################################################### +# SizeUp.app # +############################################################################### + +# Start SizeUp at login +# defaults write com.irradiatedsoftware.SizeUp StartAtLogin -bool true + +# Don’t show the preferences window on next start +# defaults write com.irradiatedsoftware.SizeUp ShowPrefsOnNextStart -bool false + +############################################################################### +# Sublime Text # +############################################################################### + +# Install Sublime Text settings +# cp -r init/Preferences.sublime-settings ~/Library/Application\ Support/Sublime\ Text*/Packages/User/Preferences.sublime-settings 2> /dev/null + +############################################################################### +# Spectacle.app # +############################################################################### + +# Set up my preferred keyboard shortcuts +# cp -r init/spectacle.json ~/Library/Application\ Support/Spectacle/Shortcuts.json 2> /dev/null + +############################################################################### +# Transmission.app # +############################################################################### + +# Use `~/Documents/Torrents` to store incomplete downloads +defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true +defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Documents/Torrents" + +# Use `~/Downloads` to store completed downloads +defaults write org.m0k.transmission DownloadLocationConstant -bool true + +# Don’t prompt for confirmation before downloading +defaults write org.m0k.transmission DownloadAsk -bool false +defaults write org.m0k.transmission MagnetOpenAsk -bool false + +# Don’t prompt for confirmation before removing non-downloading active transfers +defaults write org.m0k.transmission CheckRemoveDownloading -bool true + +# Trash original torrent files +defaults write org.m0k.transmission DeleteOriginalTorrent -bool true + +# Hide the donate message +defaults write org.m0k.transmission WarningDonate -bool false +# Hide the legal disclaimer +defaults write org.m0k.transmission WarningLegal -bool false + +# IP block list. +# Source: https://giuliomac.wordpress.com/2014/02/19/best-blocklist-for-transmission/ +defaults write org.m0k.transmission BlocklistNew -bool true +defaults write org.m0k.transmission BlocklistURL -string "http://john.bitsurge.net/public/biglist.p2p.gz" +defaults write org.m0k.transmission BlocklistAutoUpdate -bool true + +# Randomize port on launch +defaults write org.m0k.transmission RandomPort -bool true + +############################################################################### +# Twitter.app # +############################################################################### + +# Disable smart quotes as it’s annoying for code tweets +# defaults write com.twitter.twitter-mac AutomaticQuoteSubstitutionEnabled -bool false + +# Show the app window when clicking the menu bar icon +defaults write com.twitter.twitter-mac MenuItemBehavior -int 1 + +# Enable the hidden ‘Develop’ menu +defaults write com.twitter.twitter-mac ShowDevelopMenu -bool true + +# Open links in the background +defaults write com.twitter.twitter-mac openLinksInBackground -bool true + +# Allow closing the ‘new tweet’ window by pressing `Esc` +defaults write com.twitter.twitter-mac ESCClosesComposeWindow -bool true + +# Show full names rather than Twitter handles +defaults write com.twitter.twitter-mac ShowFullNames -bool true + +# Hide the app in the background if it’s not the front-most window +defaults write com.twitter.twitter-mac HideInBackground -bool true + ############################################################################### # Kill affected applications # ############################################################################### -for app in "Activity Monitor" "Address Book" "Calendar" "Contacts" "cfprefsd" \ - "Dock" "Finder" "Mail" "Messages" "Photos" "Safari" "SystemUIServer" \ - "Terminal" "Tweetbot" "iCal"; do +for app in "Activity Monitor" \ + "Address Book" \ + "Calendar" \ + "cfprefsd" \ + "Contacts" \ + "Dock" \ + "Finder" \ + "Google Chrome Canary" \ + "Google Chrome" \ + "Mail" \ + "Messages" \ + "Opera" \ + "Photos" \ + "Safari" \ + "SizeUp" \ + "Spectacle" \ + "SystemUIServer" \ + "Terminal" \ + "Transmission" \ + "Twitter" \ + "iCal"; do killall "${app}" &> /dev/null done - echo "Done. Note that some of these changes require a logout/restart to take effect." - - diff --git a/.zshrc b/.zshrc index 39da1c915..25ab7c85e 100644 --- a/.zshrc +++ b/.zshrc @@ -6,17 +6,6 @@ # source $ZPLUG_HOME/init.zsh -# # Which plugins would you like to load? -# # Standard plugins can be found in ~/.oh-my-zsh/plugins/* -# # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ -# # Example format: plugins=(rails git textmate ruby lighthouse) -# # Add wisely, as too many plugins slow down shell startup. -# plugins=(git) - -# source $ZSH/oh-my-zsh.sh - -# zplug 'zplug/zplug', hook-build:'zplug --self-manage' - # # Plugins # zplug "~/.dotfiles", from:local @@ -37,7 +26,7 @@ export DOTFILES=$HOME/.dotfiles # If you come from bash you might have to change your $PATH. -# export PATH=$HOME/bin:/usr/local/bin:$PATH +export PATH=$HOME/bin:/usr/local/bin:$PATH # Path to your oh-my-zsh installation. export ZSH=$HOME/.oh-my-zsh @@ -53,12 +42,12 @@ export MNML_RPROMPT=('mnml_cwd 20') # Set name of the theme to load --- if set to "random", it will # load a random theme each time oh-my-zsh is loaded, in which case, # to know which specific one was loaded, run: echo $RANDOM_THEME -# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes +# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes ZSH_THEME="minimal" # Set list of themes to pick from when loading at random # Setting this variable when ZSH_THEME=random will cause zsh to load -# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/ +# a theme from this variable instead of looking in $ZSH/themes/ # If set to an empty array, this variable will have no effect. # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) @@ -69,17 +58,16 @@ ZSH_THEME="minimal" # Case-sensitive completion must be off. _ and - will be interchangeable. # HYPHEN_INSENSITIVE="true" -# Uncomment the following line to disable bi-weekly auto-update checks. -# DISABLE_AUTO_UPDATE="true" - -# Uncomment the following line to automatically update without prompting. -# DISABLE_UPDATE_PROMPT="true" +# Uncomment one of the following lines to change the auto-update behavior +# zstyle ':omz:update' mode disabled # disable automatic updates +# zstyle ':omz:update' mode auto # update automatically without asking +# zstyle ':omz:update' mode reminder # just remind me to update when it's time # Uncomment the following line to change how often to auto-update (in days). -# export UPDATE_ZSH_DAYS=13 +# zstyle ':omz:update' frequency 13 # Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS=true +# DISABLE_MAGIC_FUNCTIONS="true" # Uncomment the following line to disable colors in ls. # DISABLE_LS_COLORS="true" @@ -91,6 +79,9 @@ ZSH_THEME="minimal" # ENABLE_CORRECTION="true" # Uncomment the following line to display red dots whilst waiting for completion. +# You can also set it to another string to have that shown instead of the default red dots. +# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" +# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) # COMPLETION_WAITING_DOTS="true" # Uncomment the following line if you want to disable marking untracked files @@ -110,11 +101,12 @@ HIST_STAMPS="dd/mm/yyyy" ZSH_CUSTOM=$DOTFILES # Which plugins would you like to load? + # Standard plugins can be found in ~/.oh-my-zsh/plugins/* # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. -plugins=(git) +plugins=(artisan git) source $ZSH/oh-my-zsh.sh @@ -152,3 +144,31 @@ if [ -f '/Users/larry/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/lar autoload -U +X bashcompinit && bashcompinit complete -o nospace -C /usr/local/bin/terraform terraform + +# Herd injected PHP binary. +export PHP_INI_SCAN_DIR="$HOME/Library/Application Support/Herd/config/php/":$PHP_INI_SCAN_DIR + +# Herd injected NVM configuration +export NVM_DIR="$HOME/Library/Application Support/Herd/config/nvm" + +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm + +[[ -f "/Applications/Herd.app/Contents/Resources/config/shell/zshrc.zsh" ]] && builtin source "/Applications/Herd.app/Contents/Resources/config/shell/zshrc.zsh" + +# Herd injected PHP 7.4 configuration. +export HERD_PHP_74_INI_SCAN_DIR="/Users/driesvints/Library/Application Support/Herd/config/php/74/" + +# Herd injected PHP 8.3 configuration. +export HERD_PHP_83_INI_SCAN_DIR="/Users/driesvints/Library/Application Support/Herd/config/php/83/" + +# Herd injected PHP 8.2 configuration. +export HERD_PHP_82_INI_SCAN_DIR="/Users/driesvints/Library/Application Support/Herd/config/php/82/" + +# Herd injected PHP 8.1 configuration. +export HERD_PHP_81_INI_SCAN_DIR="/Users/driesvints/Library/Application Support/Herd/config/php/81/" + +# Herd injected PHP 8.0 configuration. +export HERD_PHP_80_INI_SCAN_DIR="/Users/driesvints/Library/Application Support/Herd/config/php/80/" + +# Herd injected PHP binary. +export PATH="/Users/driesvints/Library/Application Support/Herd/bin/":$PATH diff --git a/Brewfile b/Brewfile index dea3a7fed..c678644da 100644 --- a/Brewfile +++ b/Brewfile @@ -4,24 +4,32 @@ tap 'homebrew/cask-eid' tap 'homebrew/cask-fonts' tap 'homebrew/cask-versions' tap 'homebrew/bundle' +tap 'stripe/stripe-cli' # Binaries brew 'awscli' brew 'bash' # Latest Bash version -brew 'bat' # "cat" on steroids +brew 'bat' # Used for spatie/visit brew 'coreutils' # Those that come with macOS are outdated +brew 'ffmpeg' +brew 'gh' brew 'git' -brew 'gnupg2' brew 'grep' +brew 'httpie' +brew 'jq' # Used for spatie/visit brew 'mackup' brew 'mas' # Mac App Store manager brew 'pkg-config' # https://github.com/driesvints/dotfiles/issues/20 -brew 'trash' # Manage the Trash bin -brew 'tree' # List directories in a tree structure -brew 'zlib' # Needed for Memcached -brew 'zplug' # ZSH Plugin Manager -brew 'zsh' -brew 'zsh-completions' +brew 'stripe/stripe-cli/stripe' +brew 'stripe/stripe-mock/stripe-mock' +brew 'svn' # Needed to install fonts + +# Spatie Medialibrary +brew 'jpegoptim' +brew 'optipng' +brew 'pngquant' +brew 'svgo' +brew 'gifsicle' # Development brew 'php' @@ -48,13 +56,40 @@ cask 'vagrant' cask 'virtualbox' cask 'virtualbox-extension-pack' cask 'visual-studio-code' +brew 'imagemagick' +brew 'yarn' + +# Apps +cask '1password' +brew '1password-cli' +cask 'caffeine' +cask 'discord' +cask 'docker' +cask 'figma' +cask 'firefox' +cask 'github' +cask 'google-chrome' +cask 'helo' +cask 'herd' +cask 'httpie' +cask 'imageoptim' +cask 'pastebot' +cask 'readdle-spark' +cask 'screenflow' +cask 'slack' +cask 'tableplus' +cask 'telegram-desktop' +cask 'the-unarchiver' +cask 'tinkerwell' +cask 'transmit' +cask 'tunnelbear' +cask 'tuple' +cask 'visual-studio-code' +cask 'zoom' # Quicklook -cask 'qlcolorcode' cask 'qlmarkdown' cask 'quicklook-json' -cask 'quicklook-csv' -cask 'qlstephen' # Fonts cask 'font-lato' @@ -62,5 +97,14 @@ cask 'font-open-sans' cask 'font-roboto' cask 'font-source-code-pro-for-powerline' cask 'font-source-code-pro' -cask 'font-source-sans-pro' cask 'font-source-serif-pro' + +# Mac App Store +# mas 'Byword', id: 420212497 +# mas 'Giphy Capture', id: 668208984 +# mas 'Keynote', id: 409183694 +# mas 'MyWoosh', id: 1498889644 +# mas 'Numbers', id: 409203825 +# mas 'Speedtest', id: 1153157709 +# mas 'Spring', id: 1508706541 +# mas 'Things', id: 904280696 diff --git a/Brewfile.lock.json b/Brewfile.lock.json deleted file mode 100644 index 57d629835..000000000 --- a/Brewfile.lock.json +++ /dev/null @@ -1,573 +0,0 @@ -{ - "entries": { - "tap": { - "homebrew/cask": { - "revision": "3723b8a6988ca9b46754fe233f9905ec1929b16e" - }, - "homebrew/cask-eid": { - "revision": "248e26a85a5e903fd134954ec82138cfe35eb5ce" - }, - "homebrew/cask-fonts": { - "revision": "5f28f0f75f7ad081a9c010ac2846fcc67984e1c9" - }, - "homebrew/cask-versions": { - "revision": "97d3c5261a96bcb4ff0bd834d8021e717a721738" - }, - "homebrew/bundle": { - "revision": "1a41629972a351085d297e2c336f8eda0dc771eb" - } - }, - "brew": { - "awscli": { - "version": "1.16.280", - "bottle": { - "cellar": ":any_skip_relocation", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/awscli-1.16.280.catalina.bottle.tar.gz", - "sha256": "5162365a8df04b98299dca8c6069b191fc3c12d1a5219689766a0cb37dafcabd" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/awscli-1.16.280.mojave.bottle.tar.gz", - "sha256": "946a903b33ad429723fd606143699ebe34f501f8c56006a6aaeb2593134de96f" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/awscli-1.16.280.high_sierra.bottle.tar.gz", - "sha256": "334f57c5c99b0932d2f5a8cfd0627b0816ccc9a000877f9c5a271c0c090dca1e" - } - } - } - }, - "bash": { - "version": "5.0.11", - "bottle": { - "cellar": "/usr/local/Cellar", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/bash-5.0.11.catalina.bottle.tar.gz", - "sha256": "c20c5b4c9864c58fd5347301bd8e8f78c4e0e8d3ba1ff109e200ff2612d30f11" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/bash-5.0.11.mojave.bottle.tar.gz", - "sha256": "01d371ab4c7069858cbc660c18c8722dbc397a4fc85c66a5723d06c82a13e150" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/bash-5.0.11.high_sierra.bottle.tar.gz", - "sha256": "d53c1b8ce452eef490b301a7afadaec97aa6942e4d921b0f39a46108edeb2a22" - }, - "sierra": { - "url": "https://homebrew.bintray.com/bottles/bash-5.0.11.sierra.bottle.tar.gz", - "sha256": "0002727c12bd2d1fa059f5cd70045fd5b3bcbc654b82559429ac64fe37b41ac8" - } - } - } - }, - "bat": { - "version": "0.12.1", - "bottle": { - "cellar": ":any_skip_relocation", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/bat-0.12.1.catalina.bottle.2.tar.gz", - "sha256": "fe47d61a6eedc6442d4a2b45bb15eadce806102c46247dd866e762fc510f2ac0" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/bat-0.12.1.mojave.bottle.2.tar.gz", - "sha256": "c01694ccd70256fe852f5f597ed1ab917161642e1309b367caa537f77f98ebf8" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/bat-0.12.1.high_sierra.bottle.2.tar.gz", - "sha256": "d06770fb4f496a0dfa8294431d65d93c53c4fa14a09c28ca7d87bbacf8419cb3" - } - } - } - }, - "coreutils": { - "version": "8.31", - "bottle": { - "cellar": "/usr/local/Cellar", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/coreutils-8.31.catalina.bottle.1.tar.gz", - "sha256": "7262e4c76483ea796454db828c25955be1e6b2bc8e056ba1dd6e92bfe1118da5" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/coreutils-8.31.mojave.bottle.1.tar.gz", - "sha256": "05ae58c26a53c2dfa2d9d45943b9d21753eea59609f0a48caa59713d6f6392d7" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/coreutils-8.31.high_sierra.bottle.1.tar.gz", - "sha256": "5cba7394f1995fad0f6215a7618f65983dcf84b93b076af18d09354051320fb2" - } - } - } - }, - "git": { - "version": "2.24.0_2", - "bottle": { - "cellar": "/usr/local/Cellar", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/git-2.24.0_2.catalina.bottle.tar.gz", - "sha256": "87100f6c01be17be5501be0ee5d674610e594ee0ae2d57ac3a2ebefec601e589" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/git-2.24.0_2.mojave.bottle.tar.gz", - "sha256": "343c1a0b842b84095aa0632ea7ca3f1717103fe4f393a6014c7f6165b079c849" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/git-2.24.0_2.high_sierra.bottle.tar.gz", - "sha256": "c4c40270f2acd82234660d8e1b3093294222fd8dc47687fc575815ed8544baf0" - } - } - } - }, - "gnupg2": null, - "grep": { - "version": "3.3", - "bottle": { - "cellar": ":any", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/grep-3.3.catalina.bottle.2.tar.gz", - "sha256": "18cfdeab08ab5b1cef0bb1cc750636109e7a7733a9219a67430cd47bfbd4f34f" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/grep-3.3.mojave.bottle.2.tar.gz", - "sha256": "ca4b36489d4767f809516edaed8e4f869834dfca40e7ccfa2c697e1ffa771717" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/grep-3.3.high_sierra.bottle.2.tar.gz", - "sha256": "3d31c9e997b832a9035394e51191d4f26357b51412d78e0029e19d5a6fc7efdb" - }, - "sierra": { - "url": "https://homebrew.bintray.com/bottles/grep-3.3.sierra.bottle.2.tar.gz", - "sha256": "830c7d077c489b9276a314c631a32d539c476efa7fa3857e9ed5913aa92c9c06" - } - } - } - }, - "mackup": { - "version": "0.8.27", - "bottle": { - "cellar": ":any_skip_relocation", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/mackup-0.8.27.catalina.bottle.tar.gz", - "sha256": "75c445a02e47bbba500ac30ec951ec84b4009cd9d49c2854bf9fda02e9bdbdc8" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/mackup-0.8.27.mojave.bottle.tar.gz", - "sha256": "f80bd4765b5a3489d6faa6ef1099ca97478f30ba19d9ba8ce7df33f8e0a6b040" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/mackup-0.8.27.high_sierra.bottle.tar.gz", - "sha256": "f0dc845d67a9638952e453f5668da070f879c6af12e703966a4a346f59d32b61" - }, - "sierra": { - "url": "https://homebrew.bintray.com/bottles/mackup-0.8.27.sierra.bottle.tar.gz", - "sha256": "c941c433ddcb1f6deee07ade71d4d3a9f910e229bb01601402377ebca43411fd" - } - } - } - }, - "mas": { - "version": "1.6.3", - "bottle": { - "cellar": ":any", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/mas-1.6.3.catalina.bottle.tar.gz", - "sha256": "2069b8c1c1a64c2fb91cc1c25ab9c9890c61f2182224b9e0605a35a151bb85bd" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/mas-1.6.3.mojave.bottle.tar.gz", - "sha256": "3dd5a50b551a37c164c31375cc8498ba870e29e50086bd5c4c294bc26708a6d2" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/mas-1.6.3.high_sierra.bottle.tar.gz", - "sha256": "a0d1e45203448c08420c3eab2d40ef957fd22c8e40fbeb067bc7bffe4f08dfe2" - } - } - } - }, - "pkg-config": { - "version": "0.29.2", - "bottle": { - "cellar": ":any_skip_relocation", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/pkg-config-0.29.2.catalina.bottle.1.tar.gz", - "sha256": "c0a6927c8e404f6db8b14d6644a218b22ddb0d27be1fa0a69d15bf0d9a6875ae" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/pkg-config-0.29.2.mojave.bottle.1.tar.gz", - "sha256": "dcfcba723621eee085ddd5ebadc41fb8787a4717b9686f5288281633a830ac5e" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/pkg-config-0.29.2.high_sierra.bottle.1.tar.gz", - "sha256": "b6c0b7344ea89558f5d98711625e00414dc2be53af23c9ee8fcb07554f1736ac" - } - } - } - }, - "trash": { - "version": "0.9.2", - "bottle": { - "cellar": ":any_skip_relocation", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/trash-0.9.2.catalina.bottle.tar.gz", - "sha256": "e845adfbc547dee3aff0bf9cd98c20ec2c52fadf92e9141be09c7fb86f5cdfb0" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/trash-0.9.2.mojave.bottle.tar.gz", - "sha256": "fa83a082a40fb46d6cdd954ad643c8be433bce1bb4f7f5e541d487cbdc2d920f" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/trash-0.9.2.high_sierra.bottle.tar.gz", - "sha256": "8ecc3fcedf8a31e799f04be6940850dcc6db11f2dc0f1db0fa3a3af1c49cac21" - }, - "sierra": { - "url": "https://homebrew.bintray.com/bottles/trash-0.9.2.sierra.bottle.tar.gz", - "sha256": "b30768556b816f51df0fc7d8016dec80d30a60c8402bf1238b9f9a68848677b1" - }, - "el_capitan": { - "url": "https://homebrew.bintray.com/bottles/trash-0.9.2.el_capitan.bottle.tar.gz", - "sha256": "75cebaa2b12cd75eeb1bb8deb4737639064f68f010cab94e378bd5ce727d4c34" - } - } - } - }, - "tree": { - "version": "1.8.0", - "bottle": { - "cellar": ":any_skip_relocation", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/tree-1.8.0.catalina.bottle.tar.gz", - "sha256": "18f7984bdbab22251e9fc3c7832dbace5c7f7a77e8d63717bb0078385e2bf255" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/tree-1.8.0.mojave.bottle.tar.gz", - "sha256": "7152288c457dd893de50fa9d6ac9a8599748564e1b3586eec8eff7057089051a" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/tree-1.8.0.high_sierra.bottle.tar.gz", - "sha256": "107d965994381d34e90b58a62f1c306c1b8a698db2696cdd905ba65c801ecc3b" - }, - "sierra": { - "url": "https://homebrew.bintray.com/bottles/tree-1.8.0.sierra.bottle.tar.gz", - "sha256": "07d980571469a0cc699c69a8726eee338f782ba61c041e58f01ddb2924d08aeb" - } - } - } - }, - "zlib": { - "version": "1.2.11", - "bottle": { - "cellar": ":any", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/zlib-1.2.11.catalina.bottle.tar.gz", - "sha256": "8ec66cf6faa310712767efc3022fdd16568a79234439f64bf579acb628f893bc" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/zlib-1.2.11.mojave.bottle.tar.gz", - "sha256": "245a43a59c57f83848e7382974bb80a46eac1d53bcaefb1bdebd1f85107d4169" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/zlib-1.2.11.high_sierra.bottle.tar.gz", - "sha256": "30548658b43cf66979f2756680fbb32d3c19c967e478ceea22d07f536b22bbce" - }, - "sierra": { - "url": "https://homebrew.bintray.com/bottles/zlib-1.2.11.sierra.bottle.tar.gz", - "sha256": "f822b4dbab4a15b889316b89248c7b4d15d6af9dc460bf209b9425b0accb7fa3" - }, - "el_capitan": { - "url": "https://homebrew.bintray.com/bottles/zlib-1.2.11.el_capitan.bottle.tar.gz", - "sha256": "3f912f6f1ce6c586128ebde29756c883b89409e652ca7aa9a29a773c2d4d0915" - }, - "yosemite": { - "url": "https://homebrew.bintray.com/bottles/zlib-1.2.11.yosemite.bottle.tar.gz", - "sha256": "5b969eb38b90a3e31869586df9d62e59d359212b16c6a270aee690dd67caa491" - } - } - } - }, - "zplug": { - "version": "2.4.2", - "bottle": false - }, - "zsh": { - "version": "5.7.1", - "bottle": { - "cellar": "/usr/local/Cellar", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/zsh-5.7.1.catalina.bottle.tar.gz", - "sha256": "a24afee5cc1af2b139b6afb8963992b3fb22a4b9fbfa02402ac17e6bfa66a27a" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/zsh-5.7.1.mojave.bottle.tar.gz", - "sha256": "793d87f67e64a5e01dfdea890af218e4779a2df514d395b956e464129af16fd7" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/zsh-5.7.1.high_sierra.bottle.tar.gz", - "sha256": "6656fe9aa5d5cbaff49bc9c1ccf17b7d96d21036ac44c9181bd35c57dc38b450" - }, - "sierra": { - "url": "https://homebrew.bintray.com/bottles/zsh-5.7.1.sierra.bottle.tar.gz", - "sha256": "008dfc844b88fcd61925233b08f0d78b2851bf2901320a5f6ee975da4b8604e3" - } - } - } - }, - "zsh-completions": { - "version": "0.31.0", - "bottle": false - }, - "php": { - "version": "7.3.12", - "bottle": { - "cellar": "/usr/local/Cellar", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/php-7.3.12.catalina.bottle.tar.gz", - "sha256": "722d443d96be2a8e13580c27630c39872da1b6d05a03b1df5780c34c45cfd315" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/php-7.3.12.mojave.bottle.tar.gz", - "sha256": "622147992d0d1a7e837ac5c2431a5383306ed351ba5ca915f950e841f6ce4956" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/php-7.3.12.high_sierra.bottle.tar.gz", - "sha256": "2963f4e3417d0f92beb93e5d5c87325132ea0828514ecd5ffb041f956b81653f" - } - } - } - }, - "imagemagick": { - "version": "7.0.9-5", - "bottle": { - "cellar": "/usr/local/Cellar", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/imagemagick-7.0.9-5.catalina.bottle.tar.gz", - "sha256": "54828695210a2c1cb268ad14087ffd36d2839366aeb98b288df2c58ead26081c" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/imagemagick-7.0.9-5.mojave.bottle.tar.gz", - "sha256": "77e3f4c7e39e46d6b2e18ee9e08699a816f2040698b4c011726e1556bf58d55e" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/imagemagick-7.0.9-5.high_sierra.bottle.tar.gz", - "sha256": "79fbda75f6f1e34dd0f9f4c07e2aec07ac7fa242d65afbd1abd55a93436b684c" - } - } - } - }, - "mysql@5.7": { - "version": "5.7.28", - "bottle": { - "cellar": "/usr/local/Cellar", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/mysql@5.7-5.7.28.catalina.bottle.tar.gz", - "sha256": "25979cdf7664ceabbe69c4423317612e51cb2dc73d4e5cb4e24abefc29aa018a" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/mysql@5.7-5.7.28.mojave.bottle.tar.gz", - "sha256": "81cf2771fd65d0fda6536bde1366622d5305d6720ba5822a4919acd661509613" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/mysql@5.7-5.7.28.high_sierra.bottle.tar.gz", - "sha256": "c4b91823da381ca3f5c1d4016b35b0f5c02c947eecad788541cb666bfbb49290" - } - } - } - }, - "nginx": { - "version": "1.17.3_1", - "bottle": { - "cellar": "/usr/local/Cellar", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/nginx-1.17.3_1.catalina.bottle.tar.gz", - "sha256": "484511b8e595f7dba53248439c320208fc4b885ba0baf78e05cbb7f89e80b755" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/nginx-1.17.3_1.mojave.bottle.tar.gz", - "sha256": "11b43209912c3f75918d07a36c9e676ad042707a2f2948115edc3242daf0b28d" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/nginx-1.17.3_1.high_sierra.bottle.tar.gz", - "sha256": "fb7d0e09b9fa42615cb53f03c2ddaad90946a79e9bf184d48f430b7f9ce1513e" - }, - "sierra": { - "url": "https://homebrew.bintray.com/bottles/nginx-1.17.3_1.sierra.bottle.tar.gz", - "sha256": "61f78dccbe4df891bf0697ac906e6fe779ca2b3a61ab70b28412439c419d91a7" - } - } - } - }, - "node": { - "version": "13.1.0", - "bottle": { - "cellar": ":any", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/node-13.1.0.catalina.bottle.tar.gz", - "sha256": "5863d08b039c44d35a8343179cf93d495e1288efe2c669ccb77704a236e0e17b" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/node-13.1.0.mojave.bottle.tar.gz", - "sha256": "87a9fffbc4d55a0f071a69896494e5b56fc12cd8b45f3b302aaf1e48eb7551c3" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/node-13.1.0.high_sierra.bottle.tar.gz", - "sha256": "d7f42ee0972136ef49b0908bfe92cd53ca63e536d93f7eb5fd1ee455edc3b65c" - } - } - } - }, - "redis": { - "version": "5.0.7", - "bottle": { - "cellar": ":any_skip_relocation", - "prefix": "/usr/local", - "files": { - "catalina": { - "url": "https://homebrew.bintray.com/bottles/redis-5.0.7.catalina.bottle.tar.gz", - "sha256": "7a50c626ad90c40fd315f7f053460f0c6701cc2b776a1b3e83dc44698936cd0f" - }, - "mojave": { - "url": "https://homebrew.bintray.com/bottles/redis-5.0.7.mojave.bottle.tar.gz", - "sha256": "e8956553dbc1f519bcd0330bd2d41eb884997303b84dd43be686a9d974e2d003" - }, - "high_sierra": { - "url": "https://homebrew.bintray.com/bottles/redis-5.0.7.high_sierra.bottle.tar.gz", - "sha256": "789cf8094a5909d295ce3b9996b8470d565e6c9dedbc952176af670a660a8c6f" - } - } - } - } - }, - "cask": { - "alfred": { - "version": "4.0.6_1124" - }, - "discord": { - "version": "0.0.255" - }, - "firefox-developer-edition": { - "version": "latest" - }, - "google-backup-and-sync": { - "version": "latest" - }, - "google-chrome": { - "version": "78.0.3904.108" - }, - "gpg-suite": { - "version": "2019.2" - }, - "insomnia": { - "version": "7.0.3" - }, - "java": { - "version": "13.0.1,9:cec27d702aa74d5a8630c65ae61e4305" - }, - "mysqlworkbench": { - "version": "8.0.18" - }, - "sequel-pro": { - "version": "1.1.2" - }, - "slack": { - "version": "4.1.2" - }, - "transmit": { - "version": "5.6.1" - }, - "vagrant": { - "version": "2.2.6" - }, - "virtualbox": { - "version": "6.0.14,133895" - }, - "virtualbox-extension-pack": { - "version": "6.0.14" - }, - "visual-studio-code": { - "version": "1.40.1" - }, - "qlcolorcode": { - "version": "2.1.0" - }, - "qlmarkdown": { - "version": "1.3.6" - }, - "quicklook-json": { - "version": "latest" - }, - "quicklook-csv": { - "version": "1.3" - }, - "qlstephen": { - "version": "1.4.4" - }, - "font-lato": { - "version": "latest" - }, - "font-open-sans": { - "version": "latest" - }, - "font-roboto": { - "version": "latest" - }, - "font-source-code-pro-for-powerline": { - "version": "latest" - }, - "font-source-code-pro": { - "version": "2.030R-ro-1.050R-it" - }, - "font-source-sans-pro": { - "version": "2.045R-ro-1.095R-it" - }, - "font-source-serif-pro": { - "version": "3.000R" - } - } - }, - "system": { - "macos": { - "catalina": { - "HOMEBREW_VERSION": "2.1.16", - "HOMEBREW_PREFIX": "/usr/local", - "Homebrew/homebrew-core": "3c4768deebcceaf23040108ef4fc60237234a0cc", - "CLT": "11.0.0.0.1.1567737322", - "Xcode": "11.2.1", - "macOS": "10.15.1" - } - } - } -} \ No newline at end of file diff --git a/license.md b/LICENSE.md similarity index 97% rename from license.md rename to LICENSE.md index 29e4050a6..b110174d0 100644 --- a/license.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 Dries Vints +Copyright (c) Dries Vints 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: diff --git a/README.md b/README.md new file mode 100644 index 000000000..eeb8a5bc6 --- /dev/null +++ b/README.md @@ -0,0 +1,93 @@ +

+ +## Introduction + +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! + +📖 - [Visit my website](http://www.larrybarker.me) +📺 - [Follow me on Twitter](https://twitter.com/thelarrybarker) +💡 - [Check out my GitHub](https://github.com/LarryBarker) + +This repository is a fork from the original work by [Dries Vints](https://github.com/driesvints/dotfiles). If you find this repo useful, [consider sponsoring him](https://github.com/sponsors/driesvints) (a little bit)! ❤️ + +## A Fresh macOS Setup + +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). + +### Backup your data + +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. + +- Did you commit and push any changes/branches to your git repositories? +- Did you remember to save all important documents from non-iCloud directories? +- Did you save all of your work from apps which aren't synced through iCloud? +- Did you remember to export important data from your local database? +- Did you update [mackup](https://github.com/lra/mackup) to the latest version and ran `mackup backup`? + +### Setting up your Mac + +After backing up your old Mac you may now follow these install instructions to setup a new one. + +1. Update macOS to the latest version through system preferences +2. Setup an SSH key by using one of the two following methods + 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. + 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: + + ```zsh + curl https://raw.githubusercontent.com/LarryBarker/dotfiles/intel/ssh.sh | sh -s "" + ``` + +3. Clone this repo to `~/.dotfiles` with: + + ```zsh + git clone --recursive git@github.com:LarryBarker/dotfiles.git ~/.dotfiles + ``` + +4. Run the installation with: + + ```zsh + cd ~/.dotfiles && ./fresh.sh + ``` + +5. Start `Herd.app` and run its install process +6. After mackup is synced with your cloud storage, restore preferences by running `mackup restore` +7. Restart your computer to finalize the process + +Your Mac is now ready to use! + +> 💡 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. + +### Cleaning your old Mac (optionally) + +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! + +## Your Own Dotfiles + +**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.** + +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. + +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). + +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. + +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). + +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. + +```zsh +brew install mackup +mackup backup +``` + +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. + +Enjoy your own Dotfiles! + +## Thanks To... + +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). + +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. + +Special thanks to [Dries Vints](https://github.com/driesvints/dotfiles) for the original repository this one is based on. diff --git a/aliases.zsh b/aliases.zsh index 2280f0ca8..c3af1bc58 100644 --- a/aliases.zsh +++ b/aliases.zsh @@ -1,55 +1,49 @@ # Shortcuts -alias copyssh="pbcopy < $HOME/.ssh/id_rsa.pub" -alias reloadcli="source $HOME/.zshrc" +alias copyssh="pbcopy < $HOME/.ssh/id_ed25519.pub" +alias reloadshell="omz reload" alias reloaddns="dscacheutil -flushcache && sudo killall -HUP mDNSResponder" -alias ll="$(brew --prefix coreutils)/libexec/gnubin/ls -ahlF --color --group-directories-first" -weather() { curl -4 wttr.in/${1:-antwerp} } +alias ll="/opt/homebrew/opt/coreutils/libexec/gnubin/ls -AhlFo --color --group-directories-first" alias phpstorm='open -a /Applications/PhpStorm.app "`pwd`"' alias shrug="echo '¯\_(ツ)_/¯' | pbcopy" -alias c="clear" +alias compile="commit 'compile'" +alias version="commit 'version'" # Directories alias dotfiles="cd $DOTFILES" alias library="cd $HOME/Library" -alias sites="cd $HOME/Sites" -alias ..="cd .." +alias sites="cd $HOME/Herd" +alias projects="cd $HOME/Code" +alias ..="cd .." # Laravel alias art="php artisan" alias mfs="php artisan migrate:fresh --seed" +alias a="herd php artisan" +alias fresh="herd php artisan migrate:fresh --seed" +alias tinker="herd php artisan tinker" +alias seed="herd php artisan db:seed" +alias serve="herd php artisan serve" # PHP alias cfresh="rm -rf vendor/ composer.lock && composer i" +alias composer="herd composer" +alias php="herd php" # JS alias nfresh="rm -rf node_modules/ package-lock.json && npm install" - -# Vagrant -alias v="vagrant global-status" -alias vup="vagrant up" -alias vhalt="vagrant halt" -alias vssh="vagrant ssh" -alias vreload="vagrant reload" -alias vrebuild="vagrant destroy --force && vagrant up" -alias vm="ssh vagrant@127.0.0.1 -p 2222" +alias watch="npm run dev" # Docker alias docker-composer="docker-compose" -#alias dstop="docker stop $(docker ps -a -q)" -#alias dpurgecontainers="dstop && docker rm $(docker ps -a -q)" -#alias dpurgeimages="docker rmi $(docker images -q)" -#dbuild() { docker build -t=$1 .; } -#dbash() { docker exec -it $(docker ps -aqf "name=$1") bash; } + +# SQL Server +alias mssql="docker run -e ACCEPT_EULA=Y -e SA_PASSWORD=LaravelWow1986! -p 1433:1433 mcr.microsoft.com/mssql/server:2017-latest" # Git -alias commit="git add . && git commit -m" -alias gcommit="git add . && git commit" -alias wip="commit wip" -alias gst="git status" +alias gs="git status" alias gb="git branch" alias gc="git checkout" -alias gd="git diff" alias gl="git log --oneline --decorate --color" alias gnuke="git clean -df && git reset --hard" alias nah="git reset --hard && git clean -df" @@ -59,3 +53,16 @@ alias wip="git add . && git commit -m 'wip'" alias playground="./cloud_sql_proxy -instances=ionplayground-344320:us-central1:ion-db-1=tcp:3307" alias qa="./cloud_sql_proxy -instances=ion-testing-350520:us-central1:ion-db-1=tcp:3308" alias prod="./cloud_sql_proxy -instances=ion-learn-production:us-central1:ion-db-e3abe04d=tcp:3309" +alias amend="git add . && git commit --amend --no-edit" +alias commit="git add . && git commit -m" +alias diff="git diff" +alias force="git push --force-with-lease" +alias nuke="git clean -df && git reset --hard" +alias pop="git stash pop" +alias prune="git fetch --prune" +alias pull="git pull" +alias push="git push" +alias resolve="git add . && git commit --no-edit" +alias stash="git stash -u" +alias unstage="git restore --staged ." +alias wip="commit wip" diff --git a/art/banner-1x.png b/art/banner-1x.png new file mode 100644 index 000000000..64d0173c2 Binary files /dev/null and b/art/banner-1x.png differ diff --git a/art/banner-2x.png b/art/banner-2x.png new file mode 100644 index 000000000..b65fb37b2 Binary files /dev/null and b/art/banner-2x.png differ diff --git a/art/social-card-2x.png b/art/social-card-2x.png new file mode 100644 index 000000000..c7dd70f80 Binary files /dev/null and b/art/social-card-2x.png differ diff --git a/bin/setup b/bin/setup new file mode 100755 index 000000000..45a657fb8 --- /dev/null +++ b/bin/setup @@ -0,0 +1,37 @@ +#!/bin/bash + +echo "Setting up test project..." + +REPOSITORY=$1 +DIRECTORY="./$2" + +if [[ $PWD != "$HOME/Herd" ]]; then + echo "You can only setup projects in the $HOME/Herd directory." + + exit 1 +fi + +if [ -z "$REPOSITORY" ] || [ -z "$DIRECTORY" ]; then + echo "Please provide both a repository and target directory." + + exit 1 +fi + +git clone $REPOSITORY $DIRECTORY +cd $DIRECTORY + +touch database/database.sqlite + +cp .env.example .env +sed -i '' 's/DB_DATABASE=.*/DB_DATABASE=laravel/' .env +sed -i '' 's/DB_USERNAME=.*/DB_USERNAME=root/' .env +sed -i '' 's/DB_PASSWORD=.*/DB_PASSWORD=/' .env + +composer install +php artisan key:generate +php artisan migrate:fresh --seed + +npm install +npm run build + +open -a "/Applications/Visual Studio Code.app" "`pwd`" diff --git a/clone.sh b/clone.sh new file mode 100755 index 000000000..c781123b9 --- /dev/null +++ b/clone.sh @@ -0,0 +1,90 @@ +#!/bin/sh + +echo "Cloning repositories..." + +CODE=$HOME/Code +SITES=$HOME/Herd +BLADE=$CODE/blade-ui-kit +LARAVEL=$CODE/laravel + +# Sites +git clone git@github.com:blade-ui-kit/blade-ui-kit.com.git $SITES/blade-ui-kit.com +git clone git@github.com:blade-ui-kit/demo.git $SITES/demo.blade-ui-kit.com +git clone git@github.com:driesvints/driesvints.com.git $SITES/driesvints.com +git clone git@github.com:laravel/envoyer.git $SITES/envoyer +git clone git@github.com:eventyio/eventy.io.git $SITES/eventy.io +git clone git@github.com:laravel/forge.git $SITES/forge +git clone git@github.com:fullstackeurope/fullstackeurope.com.git $SITES/fullstackeurope.com +git clone git@github.com:laravel/laravel.com.git $SITES/laravel.com +git clone git@github.com:laravelio/laravel.io.git $SITES/laravel.io +git clone git@github.com:laravelio/paste.laravel.io.git $SITES/paste.laravel.io +git clone git@github.com:laravel/nova.laravel.com.git $SITES/nova +git clone git@github.com:laravel/spark.laravel.com.git $SITES/spark.laravel.com +git clone git@github.com:laravel/vapor.git $SITES/vapor + +# Personal +git clone git@github.com:lmsqueezy/laravel.git $CODE/lmsqueezy-laravel +git clone git@github.com:driesvints/vat-calculator.git $CODE/vat-calculator + +# Blade UI Kit +git clone git@github.com:blade-ui-kit/blade-docs.git $BLADE/blade-docs +git clone git@github.com:blade-ui-kit/blade-heroicons.git $BLADE/blade-heroicons +git clone git@github.com:blade-ui-kit/blade-icons.git $BLADE/blade-icons +git clone git@github.com:blade-ui-kit/blade-ui-kit.git $BLADE/blade-ui-kit +git clone git@github.com:blade-ui-kit/docs.git $BLADE/docs + +# Laravel +git clone git@github.com:laravel/beep.git $LARAVEL/beep +git clone git@github.com:laravel/breeze.git $LARAVEL/breeze +git clone git@github.com:laravel/breeze-next.git $LARAVEL/breeze-next +git clone git@github.com:laravel/browser-kit-testing.git $LARAVEL/browser-kit-testing +git clone git@github.com:laravel/cashier-stripe.git $LARAVEL/cashier-stripe +git clone git@github.com:laravel/cashier-paddle.git $LARAVEL/cashier-paddle +git clone git@github.com:laravel/docs.git $LARAVEL/docs +git clone git@github.com:laravel/dusk.git $LARAVEL/dusk +git clone git@github.com:laravel/echo.git $LARAVEL/echo +git clone git@github.com:laravel/envoy.git $LARAVEL/envoy +git clone git@github.com:laravel/folio.git $LARAVEL/folio +git clone git@github.com:laravel/forge-cli.git $LARAVEL/forge-cli +git clone git@github.com:laravel/forge-sdk.git $LARAVEL/forge-sdk +git clone git@github.com:laravel/fortify.git $LARAVEL/fortify +git clone git@github.com:laravel/framework.git $LARAVEL/framework +git clone git@github.com:laravel/helpers.git $LARAVEL/helpers +git clone git@github.com:laravel/horizon.git $LARAVEL/horizon +git clone git@github.com:laravel/installer.git $LARAVEL/installer +git clone git@github.com:laravel/jetstream.git $LARAVEL/jetstream +git clone git@github.com:laravel/jetstream-docs.git $LARAVEL/jetstream-docs +git clone git@github.com:laravel/laravel.git $LARAVEL/laravel +git clone git@github.com:laravel/legacy-factories.git $LARAVEL/legacy-factories +git clone git@github.com:laravel/lumen.git $LARAVEL/lumen +git clone git@github.com:laravel/lumen-framework.git $LARAVEL/lumen-framework +git clone git@github.com:laravel/nova.git $LARAVEL/nova +git clone git@github.com:laravel/octane.git $LARAVEL/octane +git clone git@github.com:laravel/package-template.git $LARAVEL/package-template +git clone git@github.com:laravel/pail.git $LARAVEL/pail +git clone git@github.com:laravel/passport.git $LARAVEL/passport +git clone git@github.com:laravel/pennant.git $LARAVEL/pennant +git clone git@github.com:laravel/pint.git $LARAVEL/pint +git clone git@github.com:laravel/precognition.git $LARAVEL/precognition +git clone git@github.com:laravel/prompts.git $LARAVEL/prompts +git clone git@github.com:laravel/pulse.git $LARAVEL/pulse +git clone git@github.com:laravel/sail.git $LARAVEL/sail +git clone git@github.com:laravel/sail-server.git $LARAVEL/sail-server +git clone git@github.com:laravel/sanctum.git $LARAVEL/sanctum +git clone git@github.com:laravel/scout.git $LARAVEL/scout +git clone git@github.com:laravel/serializable-closure.git $LARAVEL/serializable-closure +git clone git@github.com:laravel/slack-notification-channel.git $LARAVEL/slack-notification-channel +git clone git@github.com:laravel/socialite.git $LARAVEL/socialite +git clone git@github.com:laravel/spark-next-docs.git $LARAVEL/spark-next-docs +git clone git@github.com:laravel/spark-paddle.git $LARAVEL/spark-paddle +git clone git@github.com:laravel/spark-stripe.git $LARAVEL/spark-stripe +git clone git@github.com:laravel/telescope.git $LARAVEL/telescope +git clone git@github.com:laravel/tinker.git $LARAVEL/tinker +git clone git@github.com:laravel/ui.git $LARAVEL/ui +git clone git@github.com:laravel/valet.git $LARAVEL/valet +git clone git@github.com:laravel/vapor-cli.git $LARAVEL/vapor-cli +git clone git@github.com:laravel/vapor-core.git $LARAVEL/vapor-core +git clone git@github.com:laravel/vapor-ui.git $LARAVEL/vapor-ui +git clone git@github.com:laravel/vite-plugin.git $LARAVEL/vite-plugin +git clone git@github.com:livewire/volt.git $LARAVEL/volt +git clone git@github.com:laravel/vonage-notification-channel.git $LARAVEL/vonage-notification-channel diff --git a/fresh.sh b/fresh.sh new file mode 100755 index 000000000..74926b77a --- /dev/null +++ b/fresh.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +echo "Setting up your Mac..." + +# Check for Oh My Zsh and install if we don't have it +if test ! $(which omz); then + /bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/HEAD/tools/install.sh)" +fi + +# Check for Homebrew and install if we don't have it +if test ! $(which brew); then + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + + echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> $HOME/.zprofile + eval "$(/opt/homebrew/bin/brew shellenv)" +fi + +# Removes .zshrc from $HOME (if it exists) and symlinks the .zshrc file from the .dotfiles +rm -rf $HOME/.zshrc +ln -sw $HOME/.dotfiles/.zshrc $HOME/.zshrc + +# Update Homebrew recipes +brew update + +# Install all our dependencies with bundle (See Brewfile) +brew tap homebrew/bundle +brew bundle --file ./Brewfile + +# Set default MySQL root password and auth type +mysql -u root -e "ALTER USER root@localhost IDENTIFIED WITH mysql_native_password BY 'password'; FLUSH PRIVILEGES;" + +# Create a projects directories +mkdir $HOME/Code +mkdir $HOME/Herd + +# Create Code subdirectories +mkdir $HOME/Code/blade-ui-kit +mkdir $HOME/Code/laravel + +# Clone Github repositories +./clone.sh + +# Symlink the Mackup config file to the home directory +ln -s ./.mackup.cfg $HOME/.mackup.cfg + +# Set macOS preferences - we will run this last because this will reload the shell +source ./.macos diff --git a/install.sh b/install.sh deleted file mode 100755 index ee9614f02..000000000 --- a/install.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -echo "Setting up your Mac..." - -# Check for Homebrew and install if we don't have it -if test ! $(which brew); then - /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" -fi - -# Update Homebrew recipes -brew update - -# Install all our dependencies with bundle (See Brewfile) -brew tap homebrew/bundle -brew bundle - -# Make ZSH the default shell environment -chsh -s $(which zsh) - -# Install PHP extensions with PECL -pecl install memcached imagick - -# Install Composer -curl -sS https://getcomposer.org/installer | php -mv composer.phar /usr/local/bin/composer - -# Install global Composer packages -/usr/local/bin/composer global require laravel/installer laravel/spark-installer laravel/valet - -# Install Laravel Valet -$HOME/.composer/vendor/bin/valet install - -# Install global NPM packages -npm install --global yarn - -# Create a Sites directory -# This is a default directory for macOS user accounts but doesn't comes pre-installed -mkdir $HOME/Sites - -# Removes .zshrc from $HOME (if it exists) and symlinks the .zshrc file from the .dotfiles -rm -rf $HOME/.zshrc -ln -s $HOME/.dotfiles/.zshrc $HOME/.zshrc - -# Symlink the Mackup config file to the home directory -ln -s $HOME/.dotfiles/.mackup.cfg $HOME/.mackup.cfg - -# Set macOS preferences -# We will run this last because this will reload the shell -source .macos diff --git a/minimal.zsh-theme b/minimal.zsh-theme index cd5030d34..918d14526 100644 --- a/minimal.zsh-theme +++ b/minimal.zsh-theme @@ -160,11 +160,12 @@ function mnml_jobs { } function mnml_files { + local _ls="$(env which ls)" local _w="%{\e[0m%}" local _g="%{\e[38;5;244m%}" - local a_files="$(ls -1A | sed -n '$=')" - local v_files="$(ls -1 | sed -n '$=')" + local a_files="$($_ls -1A | sed -n '$=')" + local v_files="$($_ls -1 | sed -n '$=')" local h_files="$((a_files - v_files))" local output="${_w}[$_g${v_files:-0}" @@ -191,7 +192,7 @@ function mnml_me_ls { if [ "$(uname)" = "Darwin" ] && ! ls --version &> /dev/null; then COLUMNS=$COLUMNS CLICOLOR_FORCE=1 ls -C -G -F else - ls -C -F --color="always" -w $COLUMNS + env ls -C -F --color="always" -w $COLUMNS fi } @@ -295,4 +296,4 @@ RPROMPT='$(_mnml_wrap MNML_RPROMPT)' _mnml_bind_widgets bindkey -M main "^M" buffer-empty -bindkey -M vicmd "^M" buffer-empty \ No newline at end of file +bindkey -M vicmd "^M" buffer-empty diff --git a/path.zsh b/path.zsh index a771bbbf5..a13305740 100644 --- a/path.zsh +++ b/path.zsh @@ -1,5 +1,9 @@ -# Load Composer tools -export PATH="$HOME/.composer/vendor/bin:$PATH" +# Add directories to the PATH and prevent to add the same directory multiple times upon shell reload. +add_to_path() { + if [[ -d "$1" ]] && [[ ":$PATH:" != *":$1:"* ]]; then + export PATH="$1:$PATH" + fi +} # Load Node global installed binaries #export PATH="$HOME/.node/bin:$PATH" @@ -15,3 +19,15 @@ export PATH="node_modules/.bin:vendor/bin:$PATH" # MySQL export PATH="/usr/local/Cellar/mysql@5.7/5.7.28/bin:$PATH" +# Load dotfiles binaries +add_to_path "$DOTFILES/bin" + +# Load global Composer tools +add_to_path "$HOME/.composer/vendor/bin" + +# Load global Node installed binaries +add_to_path "$HOME/.node/bin" + +# Use project specific binaries before global ones +add_to_path "vendor/bin" +add_to_path "node_modules/.bin" diff --git a/plugins/artisan b/plugins/artisan new file mode 160000 index 000000000..d097c375f --- /dev/null +++ b/plugins/artisan @@ -0,0 +1 @@ +Subproject commit d097c375fcfc29af15172d6d7f4005187106d847 diff --git a/readme.md b/readme.md deleted file mode 100644 index b6fee286d..000000000 --- a/readme.md +++ /dev/null @@ -1,68 +0,0 @@ -# Larry's Dotfiles - -This repository serves as my way to help me setup and maintain my Mac. It takes the effort out of installing everything manually. Everything which is needed to install my preffered setup of macOS is detailed in this readme. Feel free to explore, learn and copy parts for your own dotfiles. Enjoy! :smile: - -Read the blog post: https://driesvints.com/blog/getting-started-with-dotfiles - -## A Fresh macOS Setup - -These instructions are for when you've already set up your dotfiles. If you want to get started with your own dotfiles you can [find instructions below](#your-own-dotfiles). - -### Before you re-install - -First, go through the checklist below to make sure you didn't forget anything before you wipe your hard drive. - -- Did you commit and push any changes/branches to your git repositories? -- Did you remember to save all important documents from non-iCloud directories? -- Did you save all of your work from apps which aren't synced through iCloud? -- Did you remember to export important data from your local database? -- Did you update [mackup](https://github.com/lra/mackup) to the latest version and ran `mackup backup`? - -### Installing macOS cleanly - -After going to our checklist above and making sure you backed everything up, we're going to cleanly install macOS with the latest release. Follow [this article](https://www.imore.com/how-do-clean-install-macos) to cleanly install the latest macOS. - -### Setting up your Mac - -If you did all of the above you may now follow these install instructions to setup a new Mac. - -1. Update macOS to the latest version with the App Store -2. Install Xcode from the App Store, open it and accept the license agreement -3. Install macOS Command Line Tools by running `xcode-select --install` -4. Copy your public and private SSH keys to `~/.ssh` and make sure they're set to `600` -5. Clone this repo to `~/.dotfiles` -6. Append `/usr/local/bin/zsh` to the end of your `/etc/shells` file -7. Run `install.sh` to start the installation -8. Restore preferences by running `mackup restore` -9. Restart your computer to finalize the process - -Your Mac is now ready to use! - -> Note: you can use a different location than `~/.dotfiles` if you want. Just make sure you also update the reference in the [`.zshrc`](./.zshrc) file. - -## Your Own Dotfiles - -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. - -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). - -Check out the [`Brewfile`](./Brewfile) file and adjust the apps you want to install for your machine. Use [their search page](https://caskroom.github.io/search) to check if the app you want to install is available. - -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 `.zshrc` file loads the `.dotfiles` directory. You can adjust the [`.zshrc`](./.zshrc) file to your liking to tweak your zplug setup. More info about how to customize zplug can be found [here](https://github.com/zplug/zplug#usage). - -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). - -```zsh -brew install mackup -mackup backup -``` - -You can tweak the shell theme, the zplug settings and much more. Go through the files in this repo and tweak everything to your liking. - -Enjoy your own Dotfiles! - -## Thanks To... - -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)! And lastly, I'd like to thank [Maxime Fabre](https://twitter.com/anahkiasen) for [his 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). - -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. Your work means the world! :earth_africa: :heart: diff --git a/ssh.sh b/ssh.sh new file mode 100644 index 000000000..1fe5facc4 --- /dev/null +++ b/ssh.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +echo "Generating a new SSH key for GitHub..." + +# Generating a new SSH key +# 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 +ssh-keygen -t ed25519 -C $1 -f ~/.ssh/id_ed25519 + +# Adding your SSH key to the ssh-agent +# 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 +eval "$(ssh-agent -s)" + +touch ~/.ssh/config +echo "Host *\n AddKeysToAgent yes\n UseKeychain yes\n IdentityFile ~/.ssh/id_ed25519" | tee ~/.ssh/config + +ssh-add -K ~/.ssh/id_ed25519 + +# Adding your SSH key to your GitHub account +# https://docs.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account +echo "run 'pbcopy < ~/.ssh/id_ed25519.pub' and paste that into GitHub" diff --git a/taybalt-custom.zsh-theme b/taybalt-custom.zsh-theme deleted file mode 100644 index 413183706..000000000 --- a/taybalt-custom.zsh-theme +++ /dev/null @@ -1,124 +0,0 @@ -# vim:ft=zsh ts=2 sw=2 sts=2 -# -# agnoster's Theme - https://gist.github.com/3712874 -# A Powerline-inspired theme for ZSH -# -# # README -# -# In order for this theme to render correctly, you will need a -# [Powerline-patched font](https://gist.github.com/1595572). -# -# In addition, I recommend the -# [Solarized theme](https://github.com/altercation/solarized/) and, if you're -# using it on Mac OS X, [iTerm 2](http://www.iterm2.com/) over Terminal.app - -# it has significantly better color fidelity. -# -# # Goals -# -# The aim of this theme is to only show you *relevant* information. Like most -# prompts, it will only show git information when in a git working directory. -# However, it goes a step further: everything from the current user and -# hostname to whether the last call exited with an error to whether background -# jobs are running in this shell will all be displayed automatically when -# appropriate. - -### Segment drawing -# A few utility functions to make it easy and re-usable to draw segmented prompts - -CURRENT_BG='NONE' -SEGMENT_SEPARATOR='' - -## huh dont need this -collapse_pwd() { - # echo $(pwd | sed -e "s,^$HOME,~,") - echo $(pwd | sed -e "s,^$HOME,~," | sed "s@\(.\)[^/]*/@\1/@g") -} - -# Begin a segment -# Takes two arguments, background and foreground. Both can be omitted, -# rendering default background/foreground. -prompt_segment() { - local bg fg - [[ -n $1 ]] && bg="%K{$1}" || bg="%k" - [[ -n $2 ]] && fg="%F{$2}" || fg="%f" - if [[ $CURRENT_BG != 'NONE' && $1 != $CURRENT_BG ]]; then - echo -n " %{$bg%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR%{$fg%} " - else - echo -n "%{$fg%} " - # echo $(pwd | sed -e "s,^$HOME,~," | sed "s@\(.\)[^/]*/@\1/@g") - # echo $(pwd | sed -e "s,^$HOME,~,") - fi - CURRENT_BG='NONE' - [[ -n $3 ]] && echo -n $3 -} - -# End the prompt, closing any open segments -prompt_end() { - if [[ -n $CURRENT_BG ]]; then - echo -n " %{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR" - else - echo -n "%{%k%}" - fi - echo -n "%{%f%}" - CURRENT_BG='' -} - -### Prompt components -# Each component will draw itself, and hide itself if no information needs to be shown - -# Context: user@hostname (who am I and where am I) -prompt_context() { - local user=`whoami` - - if [[ "$user" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then - prompt_segment black default "%(!.%{%F{yellow}%}.)✝" - fi -} - -# Git: branch/detached head, dirty status -prompt_git() { - local ref dirty - if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then - ZSH_THEME_GIT_PROMPT_DIRTY='±' - dirty=$(parse_git_dirty) - ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)" - if [[ -n $dirty ]]; then - prompt_segment black yellow - else - prompt_segment black green - fi - echo -n "${ref/refs\/heads\// }$dirty" - fi -} - -# Dir: current working directory -prompt_dir() { - prompt_segment black blue '%~' - # echo $(pwd | sed -e "s,^$HOME,~," | sed "s@\(.\)[^/]*/@\1/@g") -} - -# Status: -# - was there an error -# - am I root -# - are there background jobs? -prompt_status() { - local symbols - symbols=() - [[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘" - [[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡" - [[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙" - - [[ -n "$symbols" ]] && prompt_segment black default "$symbols" -} - -## Main prompt -build_prompt() { - RETVAL=$? - prompt_status - prompt_context - prompt_dir - prompt_git - prompt_end -} - -PROMPT='%{%f%b%k%}$(build_prompt) ' diff --git a/themes/powerlevel10k b/themes/powerlevel10k new file mode 160000 index 000000000..2b7da93df --- /dev/null +++ b/themes/powerlevel10k @@ -0,0 +1 @@ +Subproject commit 2b7da93df04acd04d84f5de827e5b14077839a4b