Skip to content

andreffs18/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

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

Repository files navigation

It takes the effort out of installing and configuring a new Mac.
Enjoy! πŸ˜„

Built with ❀︎ by André Silva

Installation

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".

Functionality

  • 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

Future

Copy&Paste Dotfiles

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. 😁

Structure and Lifecycle

Directory structure

.
β”œβ”€β”€ 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

Lifecycle

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"]
Loading

ℹ️ Both ~/work and ~/projects folders were created in the source ~/.dotfiles/config/mac/osx

Install

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

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

Notes

After forking this repo, you should at least do the following:

  1. Change the APPLE_ID the top of the install.sh file. The one configured is specifically for my use case.
  2. Go through the config/mac/osx file and adjust the settings to your liking. You can find much more settings at mathiasbynens example.
  3. 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.
  4. If you need to tweak you $PATH you can take a look at config/system/.global_exports. All session variables are stored there. Feel free to change and explore other options.
  5. Update the config/mac/dockutil file to configure you dock. Remove it completely if you prefer the default Dock from Mac.
  6. 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!

Credits

and many thanks to the unofficial dotfiles page πŸ‘.

About

πŸ–₯πŸŽ› My ~/.dotfiles

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published