macOS set up
Publish date: Sep 13, 2021
This post documents the very basic set up I have made with a brand new account in macOS. By no means this list is comprehensive and it also reflects my personal preferences.
System Preferences->Trackpad->Tap to click: I like to be able to click with a tap.System Preferences->Accessibility->Pointer Control->Trachpad options-> checkEnable draggingthen selectthree finger drag: I like to be able to move an application or select text with three fingers.System Preferences->Dock & Menu Bar-> checkAutomatically hide and show the Dock: The space is already limited on a laptop so I want to hide the dock (on the left side for me).- I also removed lots of build-in App from the dock: click with two fingers, then
Options, thenRemove from Dcok.
- I also removed lots of build-in App from the dock: click with two fingers, then
- Homebrew is the first program to install! Now most other Apps will be installed with
brew. With the code below, it is easy to switch computers later (if withoutTimeMachine). brew install --cask alfredto install Alfred: to quickly lanch Apps (and more).- Use
Alt + Spacethen type the App you want to open, then pressenteror move down to the one you want to open and then pressenter.
- Use
brew install --cask iterm2to install iTerm2: a better option than Apple’s Terminal app.Cmd + ,to open preferences,Profiles->Colors–> setBackgroundcolor to300a24(I like the Ubuntu terminal background color).
brew tap homebrew/cask-fontsthenbrew install --cask font-iosevkato install the Iosevka font, which I really like to be my coding font.- back to iTerm2 and set Iosevka as the font
Profiles->text
- back to iTerm2 and set Iosevka as the font
brew install --cask rto install R.brew install --cask rstudioto install RStudio- I also set the font to be Iosevka:
Cmd + ,->Apperance->Editor fontand selectIosevka-Term. Cmd + ,-> in theGeneralandBasic, select Save workspace to .RData on exit to benever. I think this is a good choice for the sake of reproducibility; we should just save the important results separately instead of the whole workspace.- Open
Alfred, thenCmd + ,, in theFeaturespanel and theDefault Results, selectAdvanced, then drag and drop an RStudio project file to here. This will allow Alfred to search all RStudio projects later, which is very handy. - Install R package
usethiswithinstall.packages("usethis"); after then, in RStudio, runusethis::edit_r_environ(); in the opened file, addR_LIBS_USER="~/R". This will make sure all R packages later will be installed in one folder no matter which version of R you use. The default behavior of R will install packages in different folders (with version number) when you use different versions of R (i.e., update R to a new version and then packages will be installed in another folder named as something like this/Library/Framework/R.framework/Version/4.1/Resources/library [Default]) - In Terminal, run
mkdir ~/Rto create the folder to host R packages.
- I also set the font to be Iosevka:
Disqus comments are disabled.