Skip to content

Terri's MacOS configuration files

License

Notifications You must be signed in to change notification settings

terriann/dotfiles

Repository files navigation

Terri's Dotfiles

This is a repository of my MacOS dotfiles. Project is still a work in progress.

Files include

  • .profile bash/zsh profile
  • .gitconfig git configuration
  • .gitignore_global a global git ignore

Prerequisites

Install

Clone onto your laptop:

git clone git://github.com/terriann/dotfiles.git ~/.dotfiles

(Or, fork and keep your forked copy updated).

Install the dotfiles:

bash ~/.dotfiles/setup.sh

If using the base Homebrew setup also run this script:

bash ~/.dotfiles/setup/brew.sh

This command will create symlinks for config files in your home directory.

You will need to restart your terminal in order to make use of the changes.

ZSH Conversion

You may need to add the following line to your ~/.zshrc in order for the aliases and settings to apply.

[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile

If you're using bash as your default shell, this may need to be added to ~/.bash_profile instead.

Features

Private local settings

Create a .local copy of setting you don't want to publish. The configs will give higher precedence to private local settings named with a .local filename extension.

ex. ~/.dotfiles/<<CONFIG>>.local

Some sample local files are included, just rename the file to remove .sample

Homebrew starter

A setup file /setup/brew.sh will do a preliminary Homebrew setup. It includes a number of packages, commands, and helpful applications installed as casks.

WordPress CLI Autocomplete Support

Currently unsupported.

The WordPress autocomplete script is included in your profile, support requires the CP-CLI command wp can run correctly in the active environment.

What's Inside

git Configuration

  • Enables git shell colors

Git Shortcuts

Alias Command Description
a git a add files to repository
aa git aa add all unstaged files to repository
aliases git aliases displays all available aliases
amend git amend amend your last commit with new message or additional staged changes
br git br branch
ci git ci commit all changes files git commit -a
co git co checkout
graph git graph display a graph view of the recent git history
last git last view last commit to branch
lg git lg log that shows relative dates and files changed
st git st status
reset git reset reset a file back to it's HEAD state
unstage git unstage unstages changes

Shell Aliases & Configurations

Shell Shortcuts

Alias Command Description
.. cd ../
... cd ../../
mkdir mkdir -p Create intermediate directories as required but will not error on existing directories
ll ls -lhaG Verbose, human readable color directory listing
ls ls -GA Always ls in color and hide . and ..
grep grep --color=auto Always grep in color
ps ps -ax Processes
catn cat -n Concatenate and print content of files with line numbers

Utility Mini-scripts

These are the commands that trigger simple scripts or series of commands to yield a specific outcome.

Alias Description
bash-reload Refresh Shell and reload from ~/.profile with visual confirmation
bash-clear-history Clears bash history
zsh-clear-history Clears zsh history
pubkey Copy public key to keyboard
brewup Runs Homebrew updates, does housekeeping and reports on any vulnerable packages
npmup Uses NVM to update to the latest version of NPM and updates all global packages with scripts to log and compare global npm packages before and after the update
nodeup Uses NVM to update to the LTS version of Node.js with scripts to log and compare global npm packages before and after the update
eject-all Eject all devices
git-prune-branches Prunes (deletes) all local branches that have been merged into main after checking out the main branch.

Shortcuts for Common Applications

Alias Description
sublime Open file (or current working directory) in Sublime Text
photoshop Open file (or current working directory) in Adobe Photoshop CS
preview Open file (or current working directory) in Preview
chrome Open file (or current working directory) in Google Chrome
brave Open file (or current working directory) in Brave Browser
safari Open file (or current working directory) in Safari
finder Open file (or current working directory) in Finder
code Use methodology built into app. See https://code.visualstudio.com/docs/setup/mac

Shortcuts for MacOS Configs and Settings

Alias Description
showdotfiles Make *. files visible throughout OS
hidedotfiles Make *. files hidden throughout OS
hidedeskicons Hide icons on desktop (good for presenting)
showdeskicons Show icons on desktop
unquarantine Removed xattr quarantine
rmdropboxattr Removed xattr dropbox attributes
stdchmod Applies standard chmod settings for directories (755) and files (644)

Networking Shortcuts

Alias Command Description
flushdns dscacheutil -flushcache Flush DNS
ip ifconfig | grep "inet " | grep -v 127.0.0.1 Simple IP information output
ip1 ifconfig -a | perl -nle'/(\d+\.\d+\.\d+\.\d+)/ && print $1' More detailed IP information output
ip2 curl -s "https://en.wordpress.com/whatismyip?" | awk "{print $1}" External IP information output

Troubleshooting

Getting a prompt for Github username and password but I setup key:

Check this article to test your connection and authorize the key:
Testing your SSH connection

Changelog

Resources

Some of the resources I used and found while setting up configurations

Homebrew

Bash, Shell & Terminal Resources

About

Terri's MacOS configuration files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages