Skip to content

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 repo:

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

(Or, fork and clone).

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

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.

What's Inside

git Configuration

  • Enables git shell colors

Git Shortcuts

Command Description
git a Add files
git aa Add all unstaged files
git aliases List available aliases
git amend Amend the last commit
git br Run git branch
git ci Commit all changes (git commit -a)
git co Check out a branch
git curb Show the current branch
git graph Show recent history as a graph
git last Show the last commit on the branch
git lg Show log with relative dates and changed files
git pushup Push branch and set upstream
git reset Reset a file to HEAD
git st Show status
git unstage Unstage changes

Shell Aliases & Configurations

Shell Shortcuts

Command Description
.. Go up one directory
... Go up two directories
~ Go to home directory
mkdir Create directories as needed (no error if they exist)
ll List files verbosely with human-readable sizes and colors
ls List files in color, hide . and ..
grep Highlight matches in color
ps Show all processes
catn Display file contents 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
reload-profile Reload shell from ~/.profile
clear-history Clear Zsh history
brewup Update Homebrew, run housekeeping, report vulnerable packages
npmup Update NPM and global packages with before/after diff
nodeup Update Node.js to LTS (using NVM) and suggest global package reinstalls
eject-all Eject all devices
git-prune-branches Delete local branches merged into main after checkout

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
terminal Open current directory in a terminal window (handy inside Cursor/VS Code integrated terminal)

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

 
 
 

Contributors

Languages