General
- macOS Tips & Tricks • Saurabh 📖
A collection of 150+ nifty tips and tricks for macOS, for both system features like the Dock, Spotlight, and Mission Control and built-in apps like Safari, Mail, and Photos.
Dotfiles
- 📺 ~/.dotfiles in 100 Seconds • 14 minute video by Fireship showing how to set up a dotfiles repo and what to include in it
- 🎓 Dotfiles from Start to Finish-ish • 4 hour Udemy course about using dotfiles to automatically set up a new Mac with your preferred apps and settings
Scripting
- 📺 macOS: Run a script on login • 13 minute video by Kent C. Dodds
- 📺 Writing Shell Scripts with Modern JavaScript • 90 minute video by John Lindquist and Jason Lengstorf showing how to set up a Mac to write all shell scripts using node. They ran into environment configuration hiccups in the video that should be fixed in John’s dotfiles repo
- Managing background processes with homebrew in MacOS Ventura and beyond • Updates to the package manager makes launch agents even easier! Here’s how.
- Advanced macOS Commands • Saurabh 📖
A comprehensive reference for advanced command-line utilities that provide unique macOS functionality.
- 50 macOS Tips and Tricks Using Terminal (the last one is CRAZY!) - YouTube • NetworkChuck 📺
pmset
:- Battery status API in macOS? • Stack Overflow 👨💻
- pmset Man Page - macOS - SS64.com • SS64 📚
- pmset - Manipulate power management settings on macOS • DssW 📖
Empty trash from the command line
osascript -e 'tell app "Finder" to empty'
- How can I empty the trash from the Terminal? • Ask Different 👨💻
Settings
- 📺 7 Mac Settings You Need To Turn Off Now • 6 minute video by Payette Forward
- Getting Apple’s SF Mono Font in macOS • Shashikant Jagtap 📖
Keyboard Workflow
- Native macOS keyboard shortcuts
- Hyperkey app
- Superkey app
- Karabiner Elements
- See John Lindquist’s posts and dotfiles
- See Max Stoiber’s video and dotfiles
- skhd
- Hammerspoon
- macOS “must haves” · wincent.com • Wincent Colaiuta’s list of apps and settings
- Hammerspoon: A Better, Better Hyper Key • Evan Travers’ post about using Hammerspoon to create a Hyper key that works in all apps
- TanakritBenz/keyboard: Hammerspoon + Karabiner • Tanakrit Benz’s Hammerspoon and Karabiner config
- Mac productivity tips for developers • Mike Solomon’s post about using Hammerspoon and Karabiner to create a Hyper key
- Getting Started • Hammerspoon docs
- Sample Configurations · Hammerspoon/hammerspoon Wiki • Hammerspoon docs
Mapping Caps Lock to Escape when tapped and Control when held
- When doing this with Karabiner Elements, how do I avoid taps from registering as multiple keypresses?
- jasonrudolph/ControlEscape.spoon: ⌨ Supercharge your Control key: Tap it for Escape. Hold it for Control. • Jason Rudolph’s Hammerspoon config for mapping Caps Lock to Escape when tapped and Control when held
- How to map CapsLock to Control and Escape on Mac OS X | by Max Pechyonkin | Medium • Max Pechyonkin’s post about mapping Caps Lock to Escape when tapped and Control when held
Window Management
- Rectangle app
- Amethyst app
- yabai
- deprecates chunkwm
Stopping macOS from blocking port 5000
- If you find your port
5000
unexpectedly in use on macOS andlsof -i tcp:5000
tells you “ControlCenter” is the process that’s running, this may explain why. - If you have trouble disabling the “AirPlay Receiver” setting via the UI, this command worked for me:
/usr/bin/sudo -u <your-username> /usr/bin/defaults -currentHost write com.apple.controlcenter.plist AirplayRecieverEnabled -bool false
Quickly opening browser bookmarks with Alfred
- Recently got a new Recursion laptop and one of the first things I missed was all the bookmarks I’d saved on my old one
- Why:
- We open lots of webpages every day
- Searching through browser bookmarks is slow
- Organizing bookmarks into folders is slow
- Moving your mouse and clicking is slow
- But searching our bookmarks with your keyboard is fast!
- How:
- Install Alfred by downloading it from the website or running
brew install --cask alfred
- If you want to use Alfred as a Spotlight replacement (you should!):
- Open your macOS System Settings, go to Keybaord > Keyboard Shortcuts… > Spotlight, and uncheck “Show Spotlight search”
- Open Alfred’s Preferences, go to General, check “Launch Alfred at login” and update the “Alfred Hotkey” to cmd-space
- Open Alfred’s Preferences
- Under Features > Web Bookmarks, select one or more sources of browser bookmarks (e.g. “Google Chrome Bookmarks”)
- Wait a few minutes while Alfred indexes the bookmarks you just added
- Open Alfred and start typing and watch your bookmarks appear!
- Keep typing until the bookmark you need is the top result, then press enter to open it in the browser you selected (or, press the provided shortcut (cmd-[number]) as soon as you see your bookmark in the list)
- Install Alfred by downloading it from the website or running
- Workflow improvements:
- It takes no time to open a bookmark! Open Alfred, type a few characters, hit enter, and you’re there
- It’s now hepful to save a lot of browser bookmarks! If you think a page may ever be useful to you again, don’t hesitate to bookmark it. Since you’ll be searching instead of scrolling, it doesn’t matter how long your list of bookmarks gets. When naming each new bookmark, include any the keywords you think you might use to search for it later
- Don’t waste any more time organizing your bookmarks into folders. You’re done opening the Bookmarks menu and scrolling. You open bookmarks with Alfred now! 😎
- Over time, Alfred will learn which result you want for each combination of search characters, so your most commonly visited bookmarks will soon only require one or two characters to appear as the top result
- Hope that helps speed you up
- (add screenshots of the preferences + searches/results)
Inbox
-
Raycast:
- 📚 Raycast Manual
- Creating Custom Raycast Extensions with React - Space Jelly • Learn how to create your own Raycast extension and find unique ways to extend your launcher, from Cloudinary uploads to easily searching for creatures and items using the Hyrule Compendium API
-
Dotbot:
-
GNU stow:
- Managing dotfiles with GNU stow
- I’m Too Lazy To Use GNU Stow // 25 Days of Linux - YouTube
- Dotfiles! Here’s how I organize them. - YouTube
- dotfile, how to manage and sync with Git + GNU Stow | by Satyasheel | Medium
- Managing dotfiles with stow - Apiumhub
- Manage dotfiles with GNU Stow | Deepak Ramani
- Give Your Dotfiles a Home with GNU Stow - YouTube
- Manage your dotfiles across multiple machines with GNU Stow and Git - YouTube
- Sync your .dotfiles with git and GNU #Stow like a pro! - YouTube
- Managing dotfiles with GNU Stow | Bastian Venthur’s Blog
- Personal Linux Setup with Git Repos and Stow - ratfactor
- Brandon Invergo - Using GNU Stow to manage your dotfiles
- Manage Your Dotfiles Like a Superhero
- Unstowing and Common Stowing Issues - Developer Productivity | Frontend Masters
-
duti:
-
macOS automation tips series?
-
Keyboard only:
-
edit crontab with a different editor than your default one:
EDITOR=<editor> crontab -e
- e.g.
EDITOR=vim crontab -e
,EDITOR=code crontab -e
, etc
- e.g.
-
macos: if your mac intermittently loses the ability to ssh into (or even ping) another mac on your LAN, make sure both are running the same version of macOS; in the end, that was the issue for me
-
mac: “empty-trash”: “osascript -e ‘tell app “Finder” to empty’”
-
How to boost your efficiency with Alfred on the Mac - YouTube