# App Install Plan ## Critical - iTerm2 - https://iterm2.com/ - Command Line Tools - `xcode-select –install` - Brew - https://brew.sh/ - Alfred - https://www.alfredapp.com/ - `brew cask install Alfred` - https://twitter.com/hadleywickham/status/968624630276804608 - Two Alfred custom searches - [R code on GitHub](alfred://customsearch/Search%20GitHub%20for%20%7Bquery%7D%20in%20R/ghr/utf8/nospace/https%3A%2F%2Fgithub.com%2Fsearch%3Fq%3D%7Bquery%7D%2Blanguage%253Ar) - [GitHub (General)](alfred://customsearch/Search%20GitHub%20for%20%7Bquery%7D/gh/utf8/nospace/https%3A%2F%2Fgithub.com%2Fsearch%3Fq%3D%7Bquery%7D) - Firefox - https://www.mozilla.org/en-US/firefox/developer/ - `brew tap homebrew/cask-version` - `brew install --cask firefox-developer-edition` - Firefox Sync - [LastPass](https://www.lastpass.com/) - [Refined GitHub](https://github.com/sindresorhus/refined-github) - [Copy as Markdown](https://addons.mozilla.org/en-US/firefox/addon/copy-as-markdown/) - [Dark Reader](https://darkreader.org/) ## R - R - https://cloud.r-project.org/bin/macosx/ - RSwitch - https://rud.is/rswitch/ - RStudio - https://dailies.rstudio.com/ or via RSwitch - Packages ```r # Install and setup {pak} install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/") pak::pak_setup() # Install tidyverse pak::pkg_install("tidyverse") # and lots of other things... pak::pkg_install(c("usethis", "devtools", "here", "styler", "remotes")) pak::pkg_install(c("xaringan", "blogdown", "bookdown", "pagedown")) my_packages <- c("xaringanExtra", "js4shiny", "shrtcts", "rsthemes", "ermoji", "regexplain") pak::pkg_install(paste0("gadenbuie/", my_packages)) # more RStudio addins pak::pkg_install(c( "daattali/addinslist", "seasmith/AlignAssign", "MilesMcBain/datapasta", "MilesMcBain/gistfo" )) ``` ## Utilities - AltTab - https://alt-tab-macos.netlify.app/ - `brew cask install alt-tab` - Dozer - https://github.com/Mortennn/Dozer - `brew cask install dozer` - Rectangle - https://rectangleapp.com/ - `brew cask install rectangle` - Kap - https://getkap.co/ - `brew cask install kap` - Open Kap and install extra plugins: - [do-not-disturb](https://github.com/karaggeorge/kap-do-not-disturb#readme) turns off notifications when recording - [hide-clock](https://github.com/karaggeorge/kap-hide-clock#readme) hides the clock in menu bar when recording - [key-cast](https://github.com/karaggeorge/kap-key-cast#readme) shows key presses (I configure to show only combination keys) - [playback-speed](https://github.com/karaggeorge/kap-playback-speed#readme) adjust video speed - Set Kap keyboard shortcut to `Cmd + Shift + 3` and then disable the Mac screenshot shortcut in System Preferences > Keyboard > Shortcuts > Screenshots - Flycut - [https://github.com/TermiT/Flycut#readme](https://github.com/TermiT/Flycut#readme) - Culrs - [https://culrs.app/](https://culrs.app/) - Amphetamine - https://apps.apple.com/us/app/amphetamine/id937984704?mt=12 - Pock - https://pock.dev/ - Keycastr - https://github.com/keycastr/keycastr - `brew cask install keycastr` - irvue - https://irvue.tumblr.com/ ## Apps - Spotify - `brew cask install spotify` - Work things: - Slack - `brew cask install slack` - Zoom - Google Drive - https://www.google.com/drive/download/ - Visual Studio Code - https://code.visualstudio.com/ - `brew cask install visual-studio-code` - Notion - https://www.notion.so/ - Agenda - https://www.agenda.com/ - date focused note taking - Figma - https://www.figma.com/ - design and mockups - Fork - https://fork.dev/home - ColorSlurp - https://colorslurp.com/ - OBS - https://obsproject.com/ - `brew install --cask obs obs-virtualcam` ## Command Line Tools - Docker - https://hub.docker.com/editions/community/docker-ce-desktop-mac/ ### General Utilities - GitHub cli - https://github.com/cli/cli#github-cli - `brew install gh` - Bat - https://github.com/sharkdp/bat - `brew install bat` - Nat - https://github.com/willdoescode/nat - `brew tap willdoescode/homebrew-nat` - `brew install natls` - Bit - https://github.com/chriswalz/bit - `brew install bit-git` - Tldr - https://tldr.sh/ - Homebrew-cask-fonts - https://github.com/Homebrew/homebrew-cask-fonts - `brew tap homebrew/cask-fonts` - `brew cask install font-iconsolata` - `brew search font-` ### Node & npm - https://nodejs.dev/ - `brew install node` - Gitmoji - https://www.npmjs.com/package/gitmoji-cli - `npm install -g gitmoji-cli` - StandardJS - https://standardjs.com/ - `npm install standard –global` ### Fish Shell - https://fishshell.com/ - `brew install fish` - [fisher](https://git.io/fisher) - [Nerd Fonts](https://www.nerdfonts.com/) - `brew install --cask font-hasklug-nerd-font` - [tide](https://github.com/IlanCosman/tide) - `fisher install IlanCosman/tide` - [z](https://github.com/jethrokuan/z) - `fisher install jethrokuan/z` - [awesome fish](https://github.com/jorgebucaran/awesome.fish) ## Configuration ### General Things Stuff I've done that probably doesn't need to be done in any order. - Set Flycut clipboard navigator shortcut to `Cmd + Option + V` - Turn on Dock hiding - Rename computer: System Prefs > Sharing > Computer Name - Add _RSwitch_ to Login Items - Alias `ll` to `natls -l`: `fish> alias -s ll="natls -l"` - System Preferences > Accessibility - Zoom > ☑️ Use scroll gesture with Control keys - Enable Hover Text > ☑️ Enable Hover Text with Command ### R Config RSwitch has a command-line tool, which can be symlinked into `/usr/local/bin` for easy switching on from the terminal. See [Using RSwitch](https://rud.is/rswitch/guide/#taking_command(line)). ``` ln -s /Applications/RSwitch.app/Contents/Resources/rswitch-cmd /usr/local/bin/rswitch ``` I'm not exactly sure what went wrong with the R install, but it seems like `R` and `Rscript` aren't found. I reinstalled both versions but that didn't work. From the RSwitch docs I learned that `R` lives in ``` /Library/Frameworks/R.framework/Resources/bin/R ``` so I linked the binary into `/usr/local/bin` with ``` ln -s /Library/Frameworks/R.framework/Resources/bin/R /usr/local/bin/R ln -s /Library/Frameworks/R.framework/Resources/bin/Rscript /usr/local/bin/Rscript ``` and that fixed `R` and `Rscript` from the command line. I wonder if I should do the same for `Rcmd`, but I guess I'll find out later. ### New SSH Key Run with defaults to add key to `~/.ssh/id_rsa` ``` ssh-keygen ``` Copy `~/.ssh/id_rsa.pub` ``` cat ~/.ssh/id_rsa.pub | pbcopy ``` and add to GitHub to authenticate SSH connections at . ### Add GitHub PAT to R ```r library(usethis) browse_github_pat() # choose scopes edit_r_environ() # copy paste PAT ``` ### Setup GitHub and `gh` ``` # follow instructions gh auth login # set default protocol to ssh gh config set git_protocol ssh ``` ### .dotfiles I ended up creating a `.dotfiles` repo and I put these files into it for now. ``` . ├── bin │   └── create.r ├── git │   ├── gitconfig │   └── gitignore ├── iterm2 │   └── Profiles.json ├── r │   ├── .Rprofile │   └── .shrtcts.R ├── rstudio │   ├── keybindings │   └── rstudio-prefs.json └── vim ├── .viminfo └── .vimrc ``` ### Create work, play, notes folders I put my things into `~/work`, `~/play` and `~/notes`. - `work` is for work projects and deliverables. - `play` is for side work projects and experiments - `notes` is for reprexes, tests, keeping track of learning projects I also typically create a `default` RStudio project so that it's easy to launch a "scratchpad" R session. It also makes it easy to open the experimental session in a new RStudio window. The project lives in `~/notes/default/`. ### Mouse Size Service Once installed, I can switch to Finder and click Finder > Services > Big Mouse to enlarge the mouse for presentations or screen recording - Open **Automator** and create a new Quick Action. - Search for `AppleScript` and then drop _Run AppleScript_ into the workflow. - Set the workflow to receive no input - Paste the AppleScript code below to replace `(* Your script goes here *)` - Edit the mouse size to a number between 1 (normal) and 4 (big). I pick 4 for big mouse. - Save the workflow as "Big Mouse" - Duplicate the workflow and adjust the mouse size number to normal size - Save this new workflow as "Normal Mouse" - Switch to Finder, click Finder in menu bar, then Services, then run "Big Mouse". - Give Finder accessibility permissions if the workflow fails ``` tell application "System Preferences" activate reveal anchor "Seeing_Display" of pane id "com.apple.preference.universalaccess" end tell tell application "System Events" tell process "System Preferences" repeat until exists radio button "Cursor" of tab group 1 of group 1 of window 1 delay 0.1 end repeat click radio button "Cursor" of tab group 1 of group 1 of window 1 repeat until exists slider "Cursor Size:" of tab group 1 of group 1 of window 1 delay 0.1 end repeat set theSlider to slider "Cursor Size:" of tab group 1 of group 1 of window 1 set stash to value of theSlider set value of theSlider to 1.0 stash end tell end tell ``` **Debugging AppleScript**: [this link was essential](https://www.reddit.com/r/applescript/comments/k4gqh3/setting_bluetooth_with_applescript_in_big_sur/?utm_source=share&utm_medium=web2x&context=3) to determine which UI elements and buttons needed to be scripted in AppleScript (things changed in Big Sur). ### Fonts ``` brew install --cask \ font-fantasque-sans-mono font-fantasque-sans-mono-nerd-font \ font-noto-sans font-noto-serif font-noto-mono font-noto-mono-for-powerline font-noto-emoji \ font-hasklug-nerd-font font-anonymice-nerd-font font-meslo-lg-nerd-font \ font-fira-code font-fira-mono font-fira-sans font-fira-sans-condensed \ font-pt-mono font-pt-sans font-pt-sans-narrow font-pt-serif font-pt-sans-caption font-pt-serif-caption ```