This page contains my personal tips and tricks for macOS.
Useful apps
- Rectangle is a free app that allows to control windows with keyboard shortcuts
- Contexts: switching between windows and applications with Cmd-tab.
- The full discussion: https://apple.stackexchange.com/questions/2718/best-app-to-switch-between-all-open-windows
- AltTab is a decent free alternative
- Nimble Commander: an awesome dual-panel file manager
- Maccy: a clipboard manager
- iTerm2 is a terminal emulator that does amazing things. Some settings:
Profiles -> Set as login shell
Profiles -> Keys -> Load Preset… -> Natural text editing
: allows to use native macOS shortcuts to jump over words
Bash
- Upgrade bash: https://stackoverflow.com/a/77052639/15647
- Install
bash-completion
compatible with the new version. For Homebrew the name of the formula isbash-completion@2
. Pay attention to Homebrew’s output to properly update.bash_profile
- Add the following lines to
.bash_profile
to have nice colors and prompt:export LANG=en_US.UTF-8 # Enable colored output for ls command export CLICOLOR=1 export LSCOLORS="ExFxCxDxBxegedabagaced" # # Git prompt # GIT_PS1_SHOWSTASHSTATE=1 GIT_PS1_SHOWUNTRACKEDFILES=1 GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWCOLORHINTS=1 GIT_PS1_SHOWUPSTREAM=auto PROMPT_COMMAND='__git_ps1 "\[\e[34m\]\w\[\e[m\]" "\\\$ "'
Misc
-
Make
ssh-agent
to store keys in memory so that you don’t have to type passphrases all the time (more details https://developer.apple.com/library/archive/technotes/tn2449/_index.html):~/Desktop$ cat ~/.ssh/config AddKeysToAgent yes
-
Spell checking in Ukrainian (although it doesn’t work with “Automatic by Language”): https://apple.stackexchange.com/a/262448/241119
-
Move focus between controls using the Tab key:
System Settings -> Keyboard -> Keyboard navigation
-
TextEdit:
- Settings -> New Document -> Format -> Plain text
-
To change OS requirements for a .pkg file do the following:
# Expand the distribution package pkgutil --expand VendorPackageWithLimitations.pkg /tmp/VendorPackageWithLimitations # Edit file 'Distribution' # Flatten the package again pkgutil --flatten /tmp/VendorPackageWithLimitations/ VendorPackageWithoutLimitations.pkg