Skip to content

Tips Tricks

Marc Alvarez edited this page Oct 17, 2022 · 2 revisions

A short collection of tips/tricks related to the usage of the laptop repository and its mac script.

Setting Meslo Font in Terminal/iTerm

The Starship prompt included in this laptop configuration relies heavily on a font with emoji support, in this case the script installs such a font for you automatically (called Meslo).

After successfully completing the baseline setup via the mac script in this repository, proceed with the following instructions:

See reference images for the visual steps for both Terminal/iTerm at the bottom of this document.

Terminal (Apple default application)

  1. Open the default MacOS 'Terminal' application
  2. Open 'Preferences' for 'Terminal'
  3. Click on the 'Profile' tab in the 'Preferences' modal
  4. Click on 'Change' for 'Font' (button to the right side of that 'row')
  5. In the middle column of the font modal, called 'Family', select 'MesloLGL Nerd Font Mono'
  6. Close the 'Fonts' modal and close out the 'Preferences' modal entirely

iTerm (installed 3rd-party terminal included in the mac script execution)

  1. Open the 'iTerm' application
  2. Open 'Preferences' for 'iTerm'
  3. Click on the 'Profiles' tab in the 'Preferences' modal
  4. Click on the 'Text' sub-menu item
  5. At the bottom of the main modal area, click the font dropdown and select 'MesloLGL Nerd Font Mono'
  6. Close the 'Preferences' modal entirely

Installing NPM via NVM

Installing the commonly-used version of Node.js + NPM for our projects requires a bit of a workaround that may be non-obvious to those unfamiliar with M1 + Node compilation nuances.

To avoid compilation errors for Node.js at the version used in our Mariana Django project, 14.19.1 - you need to leverage the Rosetta translation layer.

The steps are provided below, along with reference images at the bottom of this document.

  1. Open the 'Finder' application
  2. Navigate to 'Applications'
  3. Open the 'Utilities' directory
  4. Find the 'Terminal' application, right-click on the application and select 'Duplicate'
  5. Rename the newly copied 'Terminal' application to 'Rosetta Terminal'
  6. After committing the change in name, right-click the 'Rosetta Terminal' application and select 'Get Info'
  7. In the information modal, check 'Open using Rosetta'
  8. Close out any existing 'Terminal' or 'Rosetta Terminal' applications
  9. Open 'Rosetta Terminal' and type the word 'arch' confirming you see 'i386' instead of 'arm64'
  10. If you do not see 'i386' returned, repeat the steps above confirming all steps taken were correct
  11. If you so see 'i386', proceed with installation of nvm per the instructions current to their project, ensuring that all steps performed are done so within the 'Rosetta Terminal': NVM - Installing and Updating
  12. After successfully installing nvm, close out of the 'Rosetta Terminal' - you do not need to use this again, for the foreseeable future in day-to-day activities.

Reference Images

Setting Fonts in Terminal

terminal_prefs_fonts terminal_prefs_fonts terminal_prefs_fonts terminal_prefs_fonts

Settings Fonts in iTerm

terminal_prefs_fonts terminal_prefs_fonts

Creating Rosetta Terminal

finder_applications finder_terminal_duplicate finder_terminal_rename finder_terminal_getinfo finder_terminal_openusingrosetta