The first thing we should do is to make sure we have our system updated: Apple menu (ο£Ώ) > About This Mac > Software Update
Secondly, you just need to run the following one-liner:
bash -c "`curl -fsSL https://raw.githubusercontent.com/andreffs18/dotfiles/master/install.sh`"
In case you want to revert this installation just run the "reset.sh" script:
bash -c "`curl -fsSL https://raw.githubusercontent.com/andreffs18/dotfiles/master/reset.sh`"
Note that this will only delete the
~/.dotfiles
folder and all symlinks. Xcode and all installed apps will still be installed.
To complete the installation, don't forget to setup the custom Terminal profile by importing the ~/.dotfiles/config/mac/andresilva.terminal file into Terminal > Preferences > Profiles > Import.
In case you can't find hidden folders, press the same "Command" + "Shift" + "." combination on a Finder window to toggle them visible.
Lastly, on the Terminal > Preferences > General Tab, check if the "Shells open with:" config is set to "Default login shell" with the /bin/zsh
defined on the grayed out box. Otherwise, change it to "Command: /bin/zsh
".
- Custom Terminal configurations: zsh with oh-my-zsh framework and pure prompt theme.
- Prefered IDE's for development: PyCharm, VisualStudio Code and SublimeText2.
kubectl
utils like: kube-ps1 prompt and kubectx to quickly switch between contexts.- Random emoji "Hello screen" animation.
- Util to open random Feedly "Saved for later" article π€
- Manage personal secrets using Keybase command line tools
- Add dotfiles as brew tap so we can install from
"$ brew install andreffs18-dotfiles"
. - Presentation alias that setup computer with key screen cast.
npm
usefull packages installation like, terminalizer and @vue/cli.
If you want to have your own dotfiles and feel that this is a good example to start, you need to change a few things and be aware of how this is structured. It's pretty simple and easy to configure your own dotfiles, and the first thing you need to do is fork this repo. π
.
βββ LICENSE.md
βββ README.md
βββ install.sh # Start point for the whole installation process
βββ reset.sh # Rollback shell script that partially removes these dotfiles (WIP)
βββ config
βΒ Β βββ apps # Setup and configure installed apps
βΒ Β βΒ Β βββ brew # Configure homebrew environment variables
βΒ Β βΒ Β βββ dockutil # Setup mac dock layout (which apps should appear on the dock)
βΒ Β βΒ Β βββ exercism # Setup exercism token and clone personal repo to ~/.projects folder
βΒ Β βΒ Β βββ keybase # Configure keybase and copy ~/.secrets dotfile to local machine
βΒ Β βΒ Β βββ oh-my-zsh # Define zsh and setup plugins for Oh-My-Zsh frame
βΒ Β βΒ Β βββ pure-prompt # Pure prompt theme for zsh
βΒ Β βΒ Β βββ ssh # Configure ssh agent
βΒ Β βββ git # My personal git configuration
βΒ Β βΒ Β βββ .gitconfig
βΒ Β βΒ Β βββ .gitignore_global
βΒ Β βββ mac # General mac configs
βΒ Β βΒ Β βββ andresilva.terminal # My terminal profile configuration
βΒ Β βΒ Β βββ osx # Mac Configuration (ui/ux, controls, shortcuts, etc)
βΒ Β βββ python # Python Configuration
βΒ Β βΒ Β βββ flake8
βΒ Β βββ system # dotenv files folder
βΒ Β βββ .aliases
βΒ Β βββ .bash_profile
βΒ Β βββ .bashrc
βΒ Β βββ .global_exports
βΒ Β βββ .functions
βΒ Β βββ .logging
βΒ Β βββ .mansettings
βΒ Β βββ .zshrc
βββ install # Folder for all apps installed via Homebrew and Mas.
Β Β βββ Brewfile
Β Β βββ Caskfile
Β Β βββ Masfile
Β Β βββ apps # Shell script to start Homebrew installations
In the next two sections I try my best to explain what each script is doing. Hopefully it will help you figure out how this is working under the hood. If you find it hard to understand or if you have any improvements, let me know!
---
title: ~/.dotfiles/config/system execution flowchart
---
flowchart LR
zshrc["~/.zshrc"] --> bash_profile["~/.bash_profile"]
bash_profile --> bash_rc["~/.bash_rc"]
bash_profile --> olhaqui["~/.olhaaqui"]
bash_rc --> aliases["~/.aliases"]
bash_rc --> functions["~/.functions"]
bash_rc --> logging["~/.logging"]
bash_rc --> global_exports["~/.global_exports"]
bash_rc --> mansettings["~/.mansetting"]
βΉοΈ Both ~/work and ~/projects folders were created in the source ~/.dotfiles/config/mac/osx
install.sh
does the following things, in the following order:
- Define environments for installation
- Install xcode command line tools package
- Git Clone / Git pull latest version of this repository
- Simlynk all dotfiles to be accessible from home folder (
~/
) - Setup MacOS configuration (UI/UX, finder, keyboard, shortcuts, etc)
- Install Homebrew & Cask Apps
- Setups applications with custom configurations (
~/.dotfiles/config/apps
) - Finally, install any software updates that might exist and restart laptop
reset.sh
does the following things, in the following order:
- Remove all symlinks created
- Remove "oh-my-zsh" framework and configuration files (
~/.oh-my-zsh
and~/.zshrc
) - Recursively remove all files from DOTFILES folder
- Remove ".emoji/" folder which is added for the
$ olhaaqui
command - Remove configs and secrets folder/files
- Remove installed
lolcat
app
After forking this repo, you should at least do the following:
- Change the
APPLE_ID
the top of theinstall.sh
file. The one configured is specifically for my use case. - Go through the
config/mac/osx
file and adjust the settings to your liking. You can find much more settings at mathiasbynens example. - Take a look at my
config/system/.aliases
and remove what you won't use. Most of them are just for my personal taste. You might want to add your own there. - If you need to tweak you
$PATH
you can take a look atconfig/system/.global_exports
. All session variables are stored there. Feel free to change and explore other options. - Update the
config/mac/dockutil
file to configure you dock. Remove it completely if you prefer the default Dock from Mac. - Check out the Homebrew bundle files on the
install/
directory. You might what to add other apps to install on your machine. Search for apps online to check if is there a way to install them using Homebrew or Mas.
If you had any problems with it, feel free to drop me an email or open an issue. I'll try to answer withing a couple of days!
Enjoy your own Dotfiles!
- Amazing OpenSource "Mac Setup guide", https://github.com/sb2nov/mac-setup/
- Getting started with dotfiles (by L. Kappert)
- Dotfiles are meant to be forked (by Holman)
- awesome-dotfiles, a curated open source repo with a bunch of good examples.
- The top 3 most forked repos: Paul Irish, Mathias Bynens and Lars Kappert
and many thanks to the unofficial dotfiles page π.