Giter Site home page Giter Site logo

dotfiles's Introduction

GreyGore’s dotfiles

This is my personal setup of a clean macOS Yosemite. Eventually I'd like to use this to personalize my Linux shell(s) as well.

Originally this was forked from Mathias Bynens' dotfiles, but it's since been added to and rewritten extensively.

Installation

❗ If you have customized your current environment, you should consider backing up your existing dotfiles.

Requirements

A base installation of macOS Yosemite will include curl, while git will be installed automatically as part of the command line tools.

One Line Install

export DOTFILES_USER="greygore"; bash -c "$(curl -fsSL raw.github.com/$DOTFILES_USER/dotfiles/master/bootstrap.sh)"

⚠️ If you fork, you must change DOTFILES_USER to your Github username.

By default the script will install in the ~/.dotfiles directory. An alternate location can be provided with the DOTFILES_DIRECTORY variable. For example:

export DOTFILES_USER="greygore"; export DOTFILES_DIRECTORY="$HOME/dotfiles" bash -c "$(curl -fsSL raw.github.com/$GITHUB_USER/dotfiles/master/bootstrap.sh)"

⚠️ If you install in an alternate location, you must add a .dotrc file containting a DOTFILES_ROOT variable.

Customization

Although you should consider forking this repository and customizing it to your own needs, the installation script will attempt to prompt you for user specific information, rather than using hard-coded values.

Currently, the exception to this is the macOS locale information. Don't worry: if you are not in the US (and the Eastern timezone), you'll be able to opt out of this. In the future I'll consider adding additional locale and timezone choices; if you want this, please file an issue.

Reset to defaults

Dotfiles

Removing the symbolic links from your home directory will remove any dotfile customizations. Restore any backups that you surely made before running the install script to return to your original settings.

macOS

The macOS default settings are heavily commented, with some available options commented out entirely. Additional options for each setting are documented where available, as is the default value if available. For settings using defaults, change write to delete to reset to the default system value. For example:

# Set scroll direction
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool true

# Default scroll direction
defaults delete NSGlobalDomain com.apple.swipescrolldirection

Permanent changes

macOS

The command line tools are not easily removed, nor should it be necessary to remove them. Seriously, don't worry about it.

Some macOS customizations not using defaults require additional commands to undo. Eventually there will be a macos_reset.sh script to undo all these settings, but until then you'll have to Google the command to look for solutions.

Homebrew & Cask installs

If you chose to install packages, you'll have to remove them individually using the correct commands:

brew uninstall formula_name
brew cask uninstall cask_name

Although you should be able to remove Homebrew and all installed packages by deleting the directory it was installed to (/usr/local by default), the Homebrew project recommends this simple script to remove everything.

Features

General

  • Creates a public/private SSH key
  • Configures Git (.gitconfig)

Dotfiles

All config files are symlinked into the home directory:

  • Bash configuration
    • .bash_profile - Main config, loads the following files from bash/
      • aliases - Aliases
      • completions - Additions to tab complet
      • exports - Environmental variables
      • functions - Bash functions
      • options - Bash options
      • path - Additions to $PATH
      • prompt - Customized prompt
    • .bashrc - Loads main config
  • Git configuration
    • .gitattributes - Path specific options
    • .gitignore_global - Git ignore file for all repos
    • .gitmessage - Default commit message template
  • Run command (rc) configurations
    • .ackrc
    • .curlrc
    • .jshintrc
    • .screenrc
    • .wgetrc
  • Miscellaneous
    • .editorconfig - Portable text editor config
    • .grc/ - Colorization options
    • .hushlogin - Stub file to skip copyright notice
    • .inputrc - Keybindings and readline behavior

MAC OS

  • Installs command line tools
  • Configures default OS settings
  • Install programs via Homebrew
  • Install applications via Cask
  • Install Quicklook plugins via Cask

Custom bash prompt

The custom bash prompt is based on the Solarized color palette. For best results be sure to use the included Terminal or iTerm2 theme.

Git branch/status

When your current working directory is a Git repository, the prompt will display the checked-out branch's name (and failing that, the commit SHA that HEAD is pointing to). The state of the working tree is reflected in the following way:

Symbol Meaning
+ Uncommitted changes
! Unstaged changes
? Untracked files
$ Stashed files

Further details are in the .bash_prompt file.

Screenshot

To Do

Further Research

Feedback

Suggestions/improvements welcome!

Thanks to…

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.