Following a thread I saw on hacker news, I put all of my config files and scripts under git to make setting up a new system easier.
Since this setup is a litle bit different than a normal git setup, you need to un the alias config
instead of git
. Also, since the entire home directory is technically under version control, there's a few commands you should not run (e..g, config status -u
) unless you want to traverse your entire home directory :)
Something usually goes wrong here. Good luck :)
-
Clone the git repo onto your computer.
You can rm the
separate-git
flag if you don't want to keep things under version control.cd ~ && git clone --separate-git-dir=$HOME/.myconf git@github.com:TessHuelskamp/.myconf.git temp
-
Copy the files you want over into your home directory ( e.g.,
cp temp/.aliases ~/.aliases
) -
Make sure that this line (below) is sourced in your login scripts so git knows how to interact with your home direcotry.
alias config='/usr/bin/git --git-dir=$HOME/.myconf/ --work-tree=$HOME'
Note: This line should already be in your
~/.aliases
file if you copied that over in an earlier step. -
source
the~/.aliases
file -
Configure your
config
git directory not to show untracked files by default (in this case those untracked files would be the entirity of your home directory :) )config config status.showUntrackedFiles no
Note: You'll need to remember to add any new files to this setup (e.g., any new
~/bin/exes
or~/.configs
) because git won't prompt you to do that.
The latest mac update changed the default shell from bash to zsh. I switched over to zshrc as my main shell since I don't have a strong opinion between the two shells.
I moved all of the aliases from ~/.bash_profile
into ~/.aliases
and had both the ~/.bash_profile
and ~/.zshrc
file source that aliases file.
Note that this setup means that
~/.aliases
should be a terminal node in asource
tree. If you mess that up, speaking from experience :p , you'll create an infinitesource
loop that'll block you from logging into an interactive terminal shell :) (If you do create a forever loop you can fix it by runningrm ~/.aliases
from a "New Command" window inTerminal
)
- Terminal configurations
- Option as a meta key
- Keyboard: CapsLock -> Esc
defaults write com.apple.screencapture location AN_EXISTING_DIR
- Add some desktop pointers to frequenltly used locations
ln -s ~/ScreenShots ~/Desktop
-
Also the Sandbox & Downloads
- brew
- Hot corner locks window
- Put display to sleep
- And then require password immediately after locking