Skip to content

Latest commit

ย 

History

History
832 lines (532 loc) ยท 24.6 KB

File metadata and controls

832 lines (532 loc) ยท 24.6 KB

MacOS

  1. Key concepts of MacOS
  2. Keyboard shortcuts
  3. Devs
  4. Personal list of applications for MacOS

Key concepts of MacOS

  • Processes and Windows: In MacOS a process may not have graphical windows, only the name of the application process appears in the upper left corner. By clicking on the "File" button in the context menu at the top, you can create a new graphical window of the application (or by pressing or Command-N).

    • Close and Quit:

      • Close (Red/x button on the left in a window, Shift-Command-W): refers to close a graphical application window, not a process.

      • Quit: refers to close the process of an application (Close completely) (Secondary click on the application in the Dock and "Quit" button, or on the name of the application in the top left and the "Quit" button, Command-Q).

    • Context menu: In MacOS the context menu is used much more than in other operating systems, it is the top left bar where is the name of the active process, the "File" button, "Edit", "Selection", etc, etc.

      • Some non-native MacOS options that are specific to each application may be present in your context menu. For example: In MacOS is not really native the option "Always On Top" so that a window is always on top of others, on the other hand, there will be applications that if they implement the option, an example is WhatsApp calls, it is in the context menu, Call -> Always On Top. In general, in the contextual menu there may be many interesting options that are worth reviewing.
  • App switcher (Command-Tab): The MacOS "App switcher" shows the open applications/processes, these processes do not necessarily have a graphical window open so it can be confusing. It is also important to note that "Finder" never closes completely (Quit), this can be changed but it is not recommended. To have a more traditional "Switcher app" like in Windows or Linux-Gnome, there are alternatives like AltTab.

  • Mission Control: The Mission Control is the way you can see all open (not minimized) graphic windows, from there you can also manage "Spaces", it is very similar to Gnome in Linux distributions. (Control-UpArrow or Swipe up using three fingers (or four fingers))

  • App launcher (Command-Space): The default application launcher is Spotlight, from it you can open any application, configuration, search for files and internet, and much more. The default MacOS app launcher can be changed for more powerful ones.

  • Apple Shortcuts: It is an application of the system that allows you to create interactive shortcuts with dynamic actions, mainly useful for shortcuts that change some configuration of the system or to carry out some task with some application of the own system. I usually call the shortcuts from the App launcher.

  • Sleep mode: It is the "suspend" in MacOS, in Sleep mode your computer still does many things (also uses internet connection) (at least set the hibernatemode to 25, you can query the current value with the command pmset -g | grep hibernatemode), and when you put the computer in Sleep mode it just looks like the screen is turned off. With the pmset -g log command you can see everything the system did while it was asleep.

    • The problem: The problem: The computer is probably not processing a task/program/download that you are interested in by going into Sleep mode, Sleep mode does a lot while asleep, but mainly system tasks.

    • There are two situations where your computer goes into Sleep mode automatically:

      1. When the screen turns off, but this can be avoided if the power adapter is connected and the following option is activated: System Settings -> Battery -> Options -> Prevent automatic sleeping on power adapter when display is off.

      2. When you close the screen/lid of your Macbook, and this behavior cannot be changed from the traditional settings

      3. When you lock it and the screen turns off (you can quickly turn off the screen while it is locked by pressing ESC).

      All situations of automatic sleep mode can be avoided by using applications like "Amphetamine", Or by simply running the command caffeinate -d in the terminal, the -d also prevents the screen from turning off.

  • Enable FileVault (or Firmware Password if it is an Intel processor) to lock Recovery Mode and encrypt the disk.

  • With the brightness increase key (F2), you can get more brightness than the maximum brightness with the bar in the options.

    • By using the Shift-Option key you can shift up and down by quarter on the F keys such as brightness and volume.
  • With the "Screen Sharing" app you can control other Macs.

Keyboard shortcuts

  • App launcher: Command-Space

  • Lock: Control-Command-Q

  • Show apps (Mission Control): Control-UpArrow or Swipe up using three fingers (or four fingers)

  • Switch apps: Command-Tab and Shift-Command-Tab

    • Switch active windows: Command-` and Shift-Command-`
  • Close window: Shift-Command-W

    • Close all windows: Option-Command-W

    • Close tab: Command-W

  • Close app (Quit): Command-Q or Option-Command-Esc (Force)

  • New window: Command-N or Shift-Command-N

  • Minimize window: Command-M

    • Minimize all windows: Option-Command-M
  • Full screen window: Control-Command-F

  • Refresh page (F5 in Windows): Command-R

  • Set the letter ร‘ on non-Spanish keyboard: Option-N n or Option-N N

  • Switch input source: Control-Space (Without delay) or GlobeKey (๐ŸŒ) (With delay)

  • Screenshots (I reconfigure it as follows):

    • Area (File): Shift-Command-4

    • Area (Clipboard): Shift-Control-Command-4

      • Move selected area: Move while holding the Space key down.
      • Enlarge corners of the selected area: Move while holding the Option key down.
      • Select window: Space
    • Complete (File): Shift-Command-3

    • Complete (Clipboard): Shift-Control-Command-3

    • Options: Shift-Command-5

  • Grave accent (`) or Tilde (~): Key to the right of the Shift (ABC input source).

  • Supr: Fn-Delete or Control-D

  • Emojis: Fn-E or Control-Command-Space

  • Show hidden files when selecting a file in Finder: Shift-Command-.

  • Spaces:

    • With "Desktop & Dock -> Mission Control -> Display have separate Spaces" enabled, on each external monitor I create at least 2 spaces and do not use the first one, so that when disconnecting the monitor, the windows are not merged with the first space of the main monitor.

    • The most frequent windows are assigned to "All desktops", in the Dock -> Right-click on the app -> Options -> Assign To -> All Desktops.

    • Switch spaces: Control-LeftArrow or Control-RightArrow or Swipe left/right using three fingers (or four fingers).

    • Switch spaces quickly: Control-1 or Control-2 or etc etc... Configuring it in System Settings -> Keyboard -> Keyboard Shortcuts -> Mission Control -> Mission Control -> Switch to Desktop X (While the Desktops are active).

    • Close is spaces more quickly: While in the Spaces bar, press Option to see all the close space buttons more quickly.

  • When the "Enter to send message" does not work: Fn-Enter

  • Zoom somewhere on the screen: Scroll while pressing the Control key.

    • Accesibility -> Zoom -> Use scroll gesture with modifier keys to zoom.
  • Open video in Picture in Picture or other options: Secondary double click (two-finger click).

    • Move the Picture in Picture window more precisely: Move while pressing the Command key.
  • Open preferences: Command-,

Global

  • Copy: Command-C

  • Paste: Command-V

    • Paste Without Formatting: Shift-Command-V
  • Cut: Command-X

  • Move to the beginning of the line: Control-A

  • Move to the end of a line: Control-E

  • Delete the character on the left: Control-H

  • Delete the character on the right: Control-D

  • Select all: Command-A

  • Undo: Command-Z

  • Save: Command-S

    • Save As: Shift-Command-S
  • Find: Command-F

    • Next: Command-G

    • Previous: Shift-Command-G

    • Find and Replace: Option-Command-F

Finder

  • Open file preview with Quick Look (allows to resize smaller): Space after selecting the file in Finder.

  • Move files to folder: Control-Command-N

  • Get file information: Command-I

  • Delete file: Command-Delete

Devs

Install the CommandLineTools (CLT)

GUI

xcode-select --install

Headless

curl -fsSL "https://env.arturonavax.dev/macos_install_clt.sh" | bash

Install Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Config PATH, Homebrew (Shell config)

This script determines the Homebrew folder on both the new Apple Silicon architecture and older ones.

if [[ "$(uname -s)" == "Darwin" ]]; then
    brewbin="/usr/local/bin/brew"
    [[ ! -f "$brewbin" ]] && brewbin="/opt/homebrew/bin/brew" # For Apple Silicon
    [[ -f "$brewbin" ]] && eval "$("$brewbin" shellenv)"
fi

GNU/Linux and Ubuntu utils

GNU commands that have names equal to default commands in MacOS are installed with the prefix "g", for example: ggrep.

# GNU/Linux base tools
brew install ca-certificates gnupg bash zsh vim nano less grep screen ed watch zip unzip gzip gcc make autoconf \
    automake cmake python3 git mercurial curl wget m4 byacc swig bison flex ffmpeg pkg-config llvm \
    jq htop wdiff tcpdump iftop rsync openssl@3 openvpn gdb nasm binutils coreutils diffutils findutils util-linux

# GNU tools for MacOS only
brew install gnu-indent gnu-sed gnu-tar gnu-which gnutls gnu-getopt gawk gpatch lsusb

# GNU tools with different names between APT and Homebrew
brew install netcat openssh

Config PATH, GNU utils prefixs (Not recommended)

When installing GNU utilities, they are installed with the prefix "g" in the commands, to avoid this prefix, the libexec/gnubin folders in the Homebrew folder of each command must be added to the PATH.

This can cause conflicts when overriding the GNU commands over the default ones in MacOS, so it is advisable to get used to adding the prefix "g" to GNU commands.

It may be useful to run this script when executing scripts which are only prepared for GNU/Linux systems and depend on GNU versions of the commands.

if [[ "$(command -v brew)" != "" ]]; then
    for bindir in "$(brew --prefix)/opt/"*{"/libexec/gnubin","/bin"}; do
        export PATH="$bindir:$PATH"
    done

    for mandir in "$(brew --prefix)/opt/"*{"/libexec/gnuman","/share/man/man1"}; do
        export MANPATH="$mandir:$MANPATH"
    done
fi

Show commands installed by a Homebrew package

brew list <package>
# Example: brew list coreutils

Install latest zsh

# After installing zsh with brew and configuring it in the PATH
chsh -s "$(which zsh)"

Install nerd fonts

brew tap --force homebrew/cask-fonts
brew install --cask font-caskaydia-cove-nerd-font

Install files

.pkg

installer -pkg file.pkg -target /

.app

sudo cp -rf file.app /Applications/.

.dmg

hdiutil attach file.dmg

# after installation
sudo hdiutil detach file.dmg

Config DNS

List Network Services

networksetup -listallnetworkservices

Show current DNS

networksetup -getdnsservers <NetworkService>

Set DNS

# Cloudflare
networksetup -setdnsservers <NetworkService> 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001

Remove DNS

networksetup -setdnsservers <NetworkService> empty

Flush DNS

sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
sudo killall mDNSResponderHelper

Personal list of applications for MacOS

Costs

Some of these applications are available in Setapp subscriptions ($107.88 USD/annual).

Total applications: 43 (excluding Parallels and CrossOver).

  • Free applications: 19.

  • Paid applications: 24.

    • One-time payment: 22 apps (choosing Alfred over Raycast). ($476.6 USD approx)

      • Some applications require a payment to upgrade to new versions.
      • Dato: Only one year of updates.
      • iStats Menu: Only 6 months of weather data.
    • Subscription: 2 apps. ($179.99 USD/annual approx)

  • Total applications in Setapp: 23.

    • Without Setapp: $377.25 USD + $179.99 USD/annual. (approx)

      • Some applications require a payment to upgrade to new versions.
      • Dato: Only one year of updates.
      • iStats Menu: Only 6 months of weather data.
    • With Setapp: $107.88 USD/annual

      • Updates and upgrades included.

All applications available on Setapp and paying for those that are not: $107.88 USD/annual (23 Setapp apps) + $119.34 USD approx (6 One-time payment apps)

App list

Essentials

  • Hiding icons in menu bar: Bartender or iBar

    • Pricing Bartender: $16 USD. (๐Ÿ”ถ Available on Setapp)

    • Pricing iBar: Free.

  • Spotlight replacement, and Window Manager, and Keyboard shortcut manager: Raycast or Alfred

    • Pricing Alfred:

      • Powerpack: $34 USD.

      • Normal: Free.

    • Pricing Raycast:

      • Normal: Free.

      • Pro: $96 USD/annual.

  • App switcher: AltTab (Consider adapting to the MacOS app switcher) and rcmd

    • Pricing AltTab: Free.

    • Pricing rcmd: $12.99 USD.

  • Window manager: Amethyst and Rectangle

    • Pricing Amethyst: Free.

    • Pricing Rectangle:

      • Normal: Free.

      • Pro: $9.99 USD.

    • Notes:

      • I use Amethyst only for development and workflow, with the option "Automatically float applications except those listed".

      • I use Rectangle for everything that is not part of the Amethyst layout.

      • In the Dock, the apps that are "Options" -> "Assign To" in "All Desktop" mode do not work well in Amethyst.

      • !!! Rectangle may have lost its usefulness in MacOS 15.

  • App cleaner: AppCleaner

    • Pricing: Free.

    • Note: SmartDelete, enabled.

  • App updater: Latest or MacUpdater

    • Pricing MacUpdater:

      • Standard Edition: $11.61 USD.

      • Scanning Only: Free.

    • Pricing Latest: Free.

  • Organization and documentation: Notion

    • Pricing: Free.
  • Time Tracker: Timing or Toggl Track

    • Pricing Timing: $120 USD/annual. (๐Ÿ”ถ Available on Setapp)

    • Pricing Toggle Track: Free.

  • Habit Tracker: Habitify

    • Pricing:

      • Normal: Free.

      • Pro: $30 USD.

  • Text recognition (OCR): TextSniper or Shottr

    • Pricing TextSniper: $7.99 USD. (๐Ÿ”ถ Available on Setapp)

    • Pricing Shottr: Free.

    • Note: Set shortcut to Control-Option-Command-0 (Like CleanShot X)

  • Screenshots: CleanShot X or Shottr

    • Pricing CleanShot X: $29 USD (Only one year of updates) (๐Ÿ”ถ Available on Setapp)

    • Pricing Shottr: Free.

    • Note: Set shortcut to (Like CleanShot X):

      • Area screenshot: Control-Option-Command-1

        • Move selected area: Move while holding the Space key down.
        • Enlarge corners of the selected area: Move while holding the Option key down.
        • Select window: Space
      • Repeat area screenshot: Control-Option-Command-2

      • Any window screenshot: Control-Option-Command-3

      • Fullscreen screenshot: Control-Option-Command-4

      • Active window screenshot: Control-Option-Command-5

      • Scrolling screenshot: Control-Option-Command-6

  • Calendar in the interface: Dato or Itsycal

    • Pricing Dato: $15 USD approx. (๐Ÿ”ถ Available on Setapp)

    • Pricing Itsycal: Free.

  • Battery Care: AlDente

  • Cliboard manager (Consider Raycast or Alfred): Maccy

    • Pricing: Free.

    • Note: Add password and sensitive data management applications to the blacklist of the clipboard manager.

  • Cheat Sheet shortcuts: CheatSheet

    • Pricing: Free.
  • Calculator (Consider Raycast or Alfred): Numi

    • Pricing: $29.74 USD. (๐Ÿ”ถ Available on Setapp)
  • Emails: Spark or Apple Mail

    • Pricing Spark: $59.99 USD/annual. (๐Ÿ”ถ Available on Setapp)

    • Pricing Apple Mail: Free.

  • Git GUI: SourceTree

    • Pricing: Free.
  • Prevent sleep mode: Amphetamine or command caffeinate -d

Optional

  • System monitor: iStat Menus or Stats

    • Pricing iStat Menus: $14.27 USD. (Only 6 months of weather data) (๐Ÿ”ถ Available on Setapp)

    • Pricing Stats: Free.

  • Webcam preview: Hand Mirror or Apple Photo Booth

    • Pricing Hand Mirror:

      • Pro: $9 USD approx. (๐Ÿ”ถ Available on Setapp)

      • Normal: Free.

    • Pricing Apple Photo Booth: Free.

  • Time awareness: Pandan

    • Pricing: Free.
  • Dark mode in the browser: Noir or Dark Reader

    • Pricing Noir:

      • For Safari: $4.99 USD approx.
    • Pricing Dark Reader:

      • For Safari: $4.99 USD approx.

      • For everything else: Free.

  • Video player: IINA

    • Pricing: Free.
  • Drag and drop bar: Dropzone

    • Pricing:

      • Pro: $35 USD. (๐Ÿ”ถ Available on Setapp)

      • Normal: Free.

  • Monitor manager: BetterDisplay or Monitor Control

    • Pricing BetterDisplay:

      • Normal: Free.

      • Pro: $21.42 USD.

      • Notes for external monitors:

        • "High Resolution (HiDPI)", enabled.
        • "Edit the system configuration of this display model", enabled.
          • "Enable smooth scaling", enabled.
            • "Add near-native HiDPI resolution with smooth scaling", enabled.
    • Pricing Monitor Control: Free.

  • Relax sounds: Noizio or MacOS Background Sounds (System Settings -> Accessibility -> Audio -> Background Sounds)

    • Pricing Noizio:

      • Lite: Free.

      • Pro: $19.99 USD. (๐Ÿ”ถ Available on Setapp)

    • Pricing MacOS Background sounds: Free.

  • Video downloader: Downie or VDown

    • Pricing Downnie: $19.99 USD. (๐Ÿ”ถ Available on Setapp)

    • Pricing VDown: Free.

  • Copy with formatting: Pure Paste

    • Pricing: Free.
  • Developer tools: DevToysMac

    • Pricing: Free.
  • Option switch manager: One Switch or SwitchManager

    • Pricing One Switch: $4.99 USD. (๐Ÿ”ถ Available on Setapp)

    • Pricing SwitchManager: Free.

  • Snippet manager (Consider Raycast or Alfred): Rocket Typist

    • Pricing:

      • Pro: $19.99 USD. (๐Ÿ”ถ Available on Setapp)

      • Normal: Free.

  • Hidden desktop icons (Consider One Switch or SwitchManager): HiddenMe

    • Pricing HiddenMe: $3 USD approx.
  • Cleaner and Antivirus: CleanMyMac X

    • Pricing: $89.95 USD. (๐Ÿ”ถ Available on Setapp)
  • Information on other Apple devices: AirBuddy

    • Pricing: $15.46 USD. (๐Ÿ”ถ Available on Setapp)
  • Command Palette in any applicattions: Paletro or Shift-Command-?

    • Pricing Paletro: $6.99 USD. (๐Ÿ”ถ Available on Setapp)
  • Check security settings: Pareto Security

    • Pricing: $17 USD. (๐Ÿ”ถ Available on Setapp)
  • Logitech devices manager: Logi Options+

    • Pricing: Free.
  • Smooth scrolling: Mos

    • Pricing: Free.

    • Note: When this process is started, scrolling screen capturers may have a problem.

  • Keyboard shortcut manager (Consider Raycast or Alfred):

  • Virtualization:

    • Systems: Parallels

      • Pricing:

        • Standard Edition: $129.99 USD.

        • Pro Edition: $119.99 USD/annual.

    • Applications and programs (High performance): CrossOver

      • Pricing:

        • CrossOver +: $64 USD/annual.

        • CrossOver Life: $494 USD.

      • Improve CrossOver compatibility: CXPatcher

        • Pricing: Free.