samhstn / my-config

16 stars 0 forks source link

My OSX Configuration

I like minimalist setup.

Cleaning your mac

It is good to factory reset your mac often to be aware of everything you have installed and to remove unwanted clutter.

The steps for cleaning your mac are as follows:

Applications and programs to install

Misc

system_preferences

Remove all applications in the dock except Brave, Qbserve and Iterm2.

dock

In System preferences > Trackpad:

In System preferences > Keyboard:

Hide the dock by right clicking it and selecting: Turn hiding on.

In Security & Privacy > FileVault:

(I like to ignore the recovery key as I never store anything worth keeping on my machine).


Brave

brave

In browser settings (Cmd + ,):

Add the Lastpass extension - For managing all your passwords.

lastpass_logo

This can be done in Manage extensions in the browser settings.


Karabiner-Elements

karabiner_elements

The only feature I use is remapping my Caps-Lock key to Esc when tapped and to Ctrl when held.

This can be set up by importing the Change caps_lock key modifier keys sample from pqrs

Then:


Rectangle

rectangle

In Settings > Preferences tick:

These are the commands I use:


Iterm2

iterm

In Preferences > General:

In Preferences > Profiles > General > Working directory:

In Preferences > Profiles > Window > Settings For New windows:

In Preferences > Profiles > Terminal > Notifications:


Qbserve

qbserve

Works so nicely out of the box, nothing to configure.








Freedom

qbserve

I always operate in "Locked mode" with 13 hour, overlapping schedules.

For more info on getting set up, see: https://freedom.to/blog/freedom-101-faqs-answered/





Docker

Docker desktop can be downloaded from here: https://docs.docker.com/docker-for-mac/install/

You may have to log in to DockerHub to perform the download.





Homebrew

Follow instructions found here: https://brew.sh

This is what I ran:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

These are some of the packages I'll always add:

brew install git grip fd macvim node python

Zsh

oh_my_zsh

The modern shell supported by an awesome community.

I installed it with:

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

I have a custom theme and plugin, install them with:

curl -SLs https://raw.githubusercontent.com/samhstn/my-config/master/sams-theme.zsh-theme \
  > ~/.oh-my-zsh/themes/sams-theme.zsh-theme

mkdir ~/.oh-my-zsh/plugins/sams-config
curl -SLs https://raw.githubusercontent.com/samhstn/my-config/master/sams-config.plugin.zsh \
  > ~/.oh-my-zsh/plugins/sams-config/sams-config.plugin.zsh

I have my zshrc edited like so:

ZSH_THEME="sams-theme"

...

plugins=(
  git
  sams-config
  vi-mode
)

Vim

vim

I use MacVim in the terminal, this can be installed with:

brew install macvim

Add my .vimrc with:

curl -SLs https://raw.githubusercontent.com/samhstn/my-config/master/.vimrc > ~/.vimrc

Sketch

sketch

I don't really know what I'm doing in Sketch, but it's fun to play around with and build prototypes.







Final tweaks

There are couple of additional setup steps:

# Create the `proj` directory where I put all my coding projects.
md proj

# See this medium article for git ssh setup:
# https://medium.com/@fredrikanderzon/setting-up-ssh-keys-for-multiple-bitbucket-github-accounts-a5244c28c0ac

# some git setup.
git config --global user.name <yourname>
git config --global user.email <your@email.com>

# global gitignore of `.DS_Store`.
echo ".DS_Store" > ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global

# I always disable system pager for `git branch` command.
# for more info, see: https://stackoverflow.com/a/48370253
git config --global pager.branch false

# I use system pager if diff doesn't fit on terminal screen, otherwise output to stdout.
# for more info, see: https://stackoverflow.com/a/31399632/4699289
git config --global core.pager "less -FRSX"

# Install the `m` command line tool following instructions here:
# https://github.com/samhstn/m

# (optional) we may want to symlink the custom zsh theme and plugin when in development.
rm ~/.oh-my-zsh/plugins/sams-config/sams-config.plugin.zsh
rm ~/.oh-my-zsh/themes/sams-theme.zsh-theme
git clone git@github.com:samhstn/my-config.git
ln -s $PWD/my-config/sams-config.plugin.zsh $HOME/.oh-my-zsh/plugins/sams-config/sams-config.plugin.zsh
ln -s $PWD/my-config/sams-theme.zsh-theme $HOME/.oh-my-zsh/themes/sams-theme.zsh-theme

Now your set up with exactly my configuration!

If you think I have missed anything out, or should be doing something differently let me know in an issue