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 set up
System Preferences
->Trackpad
->Tap to click
: I like to be able to click with a tap.System Preferences
->Accessibility
->Pointer Control
->Trachpad options
-> checkEnable dragging
then 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
Install Apps
- 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 alfred
to install Alfred: to quickly lanch Apps (and more).- Use
Alt + Space
then type the App you want to open, then pressenter
or move down to the one you want to open and then pressenter
.
- Use
brew install --cask iterm2
to install iTerm2: a better option than Apple’s Terminal app.Cmd + ,
to open preferences,Profiles
->Colors
–> setBackground
color to300a24
(I like the Ubuntu terminal background color).
brew tap homebrew/cask-fonts
thenbrew install --cask font-iosevka
to 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 r
to install R.brew install --cask rstudio
to install RStudio- I also set the font to be Iosevka:
Cmd + ,
->Apperance
->Editor font
and selectIosevka-Term
. Cmd + ,
-> in theGeneral
andBasic
, 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 theFeatures
panel 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
usethis
withinstall.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 ~/R
to create the folder to host R packages.
- I also set the font to be Iosevka:
Disqus comments are disabled.