Skip to content

marlomgirardi/.config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MacOS

My MacOS setup and configuration πŸ’»

This should be in ~/.config this way it can always be up to date with new changes.

Even tho each script inside .setup/scripts can be executed as its own, check .setup/install.sh as there are dependencies needed.

Structure

This is the structure used for this project.

.config/
β”‚
β”œβ”€ .data/ - All data generated during usage (as much as we can centralize)
β”œβ”€ .setup/ - All files relative to the automated setup of the OS.
β”‚  β”œβ”€  backup/ - All possible backups and used by the script to restore stuff.
β”‚  β”œβ”€  scripts/ - A bunch of scripts used to restore the settings.
β”‚  β”œβ”€  backup.sh - A generic script to do backup and not forget anything.
β”‚  β”œβ”€  install.sh - The main script where all starts.
β”‚  └─  utils.sh - a few things to help during the setup.
β”‚
β”œβ”€ _external/ - Here we have all files that will be placed in somewere else as a symbolic link.
β”‚  β”œβ”€  home/ - All files and directories in here should be in `~/`.
β”‚  └─  ... - The others have specific directories.
β”‚
β”œβ”€ ... - Files not documented are originaly from `~/.config` folder
β”‚
β”œβ”€ LICENSE Β―\_(ツ)_/Β―
└─ README.md

Homebrew

With homebrew we basically manage as much as possible:

  • CLI
  • Apps
  • Fonts

All can be found within .setup/backup/Brewfile

Install

First, make sure you are logged in into the App Store as some apps are downloaded directly from there.

Some softwares still not compatible with Silicon processors, install rosetta if you see "Bad CPU type in executable" or similar.

softwareupdate --install-rosetta

Create SSH key or import the one you have:

#
ssh-keygen -t ed25519;

# Give the proper permissions if imported
chmod 600 ~/.ssh/config
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub
# Clone
cd ~
git clone [email protected]:marlomgirardi/MacOS.git .config

Change SYSTEM_NAME to the desired computer name (optional).

# Install
SYSTEM_NAME=mbp ~/.config/.setup/install.sh

Apple

  • {domain} - Is like com.apple.dock.
  • {plist} - Is like com.apple.dock.plist. It can e a binary or a xml.

Most used commands

  • sudo find / -name "*.plist" | grep -v -E "(Info|version).plist" > plist.txt - Find all plist files except Info and version
  • osascript -e 'id of app "####"' - Find #### id to change the defaults
  • defaults domains - See all domains
  • defaults import {domain} {plist} - Import a plist
  • defaults export {domain} {pathToPlist} - Export a plist
  • plutil -convert xml1 {pathOfPlistToConvert} - Convert a binary plist to xml, easier to edit.