🐢 💨 Speedup your MacOS setup with this fine tuning settings
🐢 💨 Speedup your MacOS setup with this fine tuning settings
Repository containing all the automation required to setup your MacOS in just a few seconds after a fresh install.
Feel free to explore the repository and get anything you need 😬
installerfrom your terminal in order to avoid even having to manually install git!
bashIf you want to check out all the details involved in a migration from a legacy to a new PC, you can checkout the
installation-guide.md✍️ Repository Contents (⚠️ Outdated documentation ⚠️)
You'll find some self-explanatory files in this repo containing comments on what they do, however, here you have a brief explanation of each on of them.
💻 Shell dotfiles
.aliases: Common command aliases in order to save some characters 😬
.bashrc: Main config for Bash shell (loads common
.profile)
.functions: Common shell functions (key difference from
.aliases: functions will receive an argument)
.profile: Common profile between the different shells in order to have all the functionalities in both of them. This file loads
.aliasesand
.functions
.zshrc: Main config for ZSH shell (loads common
.profile)
.gitconfig: Different settings for the Git CSV system such as including the following file
.gitignore_global: Ignore rules to apply to every single repository (usefull to do not mess up the project
.gitignorefile with particularities of your development environment such as the
.DS_Storefiles or your IDE settings)
These are custom commands defined in binary files with little scripts to boost your productivity in your daily basis tasks:
These binaries are installed thanks to adding the binary files directory to the
PATHenvironment variable in the
.profilefile.
bin/docker_connect: Lists your running containers and let you select and open an interactive terminal in one of them
install_macos_apps.sh
This script will install Homebrew. It's a package manager for MacOS, used to install some tools like
htop,
ffmpeg,
git,
php… you get the idea, Command Line Tools, programming languages, and so on.
Homebrew also includes Homebrew Cask. It's a package manager useful to install fully functional OS X applications such as
google-chrome,
spotify,
slack…
With these 2 command line tools, we'll be able to install and upgrade our apps without having to leave the terminal. This allow us to automate the whole setup process while starting clean on a new mac, and also to do not have to open all the different apps we've installed in order to update them.
You can check out the
install_macos_apps.shscript in order to see the detailed list of the apps it will install, and modify it based on your needs, and the available packages in Homebrew and Homebrew Cask apps.
adjust_apps_settings.sh
This script is intended to create the symbolic links to each application settings in order to avoid having to copy and paste the different files on each case.
The scriptis self documented so you can check out which apps we're dealing with.
There're some apps pending to automate (Work In Progress):
Help -> Edit Custom VM Options…menu option
licenseXML key dictionary values specifying your email and serial
File -> Import settings…menu option
adjust_macos_settings.sh
This script will modify system preferences. We would recommend you to take a look at the
adjust_macos_settings.shscript in order to know the actual list of aspects it will modify. Here you have a brief list of them:
Ctrl+alt+Cmd+f…
You can explore your current settings on all the different applications just with a few commands:
defaults domains | tr ',' '\n'
defaults read com.apple.finder
defaults read-type com.apple.finder NewWindowTargetPath
write com.apple.finder NewWindowTargetPath "file:///Users/your-username/"
The problem with the previous approach is that it could be a little verbose while showing you aaaaall the different settings an application has. So here's a quick tip on how to optimize the process for these settings which can be adjusted using the UI:
defaults read > defaults_before_ui_changes.json
defaults read com.apple.finder > finder_defaults_before_ui_changes.json
defaults read > defaults_after_ui_changes.json
defaults read com.apple.finder > finder_defaults_after_ui_changes.json
beforeand
afterfiles to see what settings has been modified:
diff defaults_before_ui_changes.json defaults_after_ui_changes.json
diff finder_defaults_before_ui_changes.json finder_defaults_after_ui_changes.json
diffdoesn't provide you enough context, you can run it with
diff -C 10option to show 10 lines before and after each difference
diffoutput is a mess for you, you can open it with VS Code with
code --diff finder_defaults_before_ui_changes.json finder_defaults_after_ui_changes.json
writecommands in order to automate it the next time. For instance:
write com.apple.finder NewWindowTargetPath "file:///Users/your-username/"
This hopefully helpful repository has been developed by CodelyTV and contributors.
We've used a lot of different sources to get some inspirations on the things to do, here you have a list of them:
It would be awesome to learn from your experience automating the setup of your environment.
So please, feel free to send us your tips and tricks via Twitter (@CodelyTV), or consider opening an issue before starting to work on a Pull Request 🙂
installation-guide.mdto automations. How to procedure:
plistfiles. In this repo there're a lot of supported applications which specify the config paths.
plistfiles to this repo in case of not containing sensitive data
plistfile and this repo
conf.macos.yamlfile mapping
The MIT License (MIT). Please see License for more information.