Skip to content

MacOS

Improve Liquid Glass

Credit: https://tidbits.com/2025/10/09/how-to-turn-liquid-glass-into-a-solid-interface/

Enter the command below into Terminal to turn off Liquid Glass; turn it back on by running the command again after changing YES to NO. You’ll need to log out and log back in to see the full effect.

sh
defaults write -g com.apple.SwiftUI.DisableSolarium -bool YES

Exclude all node_modules from Time Machine backups

TIP

This can be adapted to exclude any file pattern.

<abs_path> is the absolute path to a folder on your machine to recursively search (without a trailing slash). For example: /Users/foobar/code-projects.

sh
find <abs_path> -type d -name 'node_modules' -prune -exec tmutil addexclusion {} \;

This command uses the Spotlight index to find everything that is excluded by Time Machine.

sh
sudo mdfind "com_apple_backup_excludeItem = 'com.apple.backupd'"

To confirm that the node_modules exclusion was successful, you can grep for that:

sh
sudo mdfind "com_apple_backup_excludeItem = 'com.apple.backupd'" | grep 'node_modules'

I like to compare numbers:

sh
# how many node_modules can be excluded
find <abs_path> -type d -name 'node_modules' -prune | wc -l

# how many node_modules are excluded
sudo mdfind "com_apple_backup_excludeItem = 'com.apple.backupd'" | grep 'node_modules' | wc -l

Credit:

Useful builtin CLI programs

Credit: https://saurabhs.org/advanced-macos-commands

  • pbcopy sets the value of the clipboard
  • pbpaste prints the value of the clipboard
  • networkQuality runs a network speed test, with other useful info as well
  • sips image manipulation...
    • sips -z <height> <width> <image> resizes the specified image, ignoring the previous aspect ratio.
    • sips -Z <size> <image> resizes the largest side of the specified image, preserving the aspect ratio.
    • sips -c <height> <width> <image> crops the specified image to the given dimensions (relative to the center of the original image).
    • sips -r <degrees> <image> rotates the image by the specified degrees.
    • By default, sips will destructively overwrite the input image. Use the -o flag to specify a different output file path (which must have the same file extension as the input image).

The Dock

WARNING

I did this for a while, but it introduced a bug where my cursor would frequently get stuck as an up arrow instead of whichever cursor it was supposed to be

You can adjust the animation delay and duration of the Dock in MacOS with the following configurations:

sh
# animation delay
defaults write com.apple.dock autohide-delay -float 0

# animation duration
defaults write com.apple.dock autohide-time-modifier -float 0.4

# only applies on next restart
killall Dock

Move a MacOS window via Cmd+Ctrl+Click

Credit: https://mmazzarolo.com/blog/2022-04-16-drag-window-by-clicking-anywhere-on-macos/

Enabling this allows you to ++Click on a window to move it.

Enable the feature:

bash
defaults write -g NSWindowShouldDragOnGesture -bool true

and log out.

To disable:

bash
defaults delete -g NSWindowShouldDragOnGesture

How to undo defaults write

sh
defaults delete <original-thing>

Disable monthly screen recording notifications

Credit: https://lapcatsoftware.com/articles/2024/8/10.html

The good news is that there's a way to stop the prompts forever. Ricci Adams found the file where the prompt dates are stored.

sh
defaults read ~/Library/GroupContainers/group.com.apple.replayd/ScreenCaptureApprovals.plist

This file is protected by TCC, so to access it you'll need to grant Full Disk Access to Terminal app.

{ "/Applications/Shottr.app/Contents/MacOS/Shottr" = "2024-09-21 12:40:36 +0000"; }

In the plist file, the keys are the paths of the executable files with screen recording permission, and the values are dates. I'm using the Shottr screenshot tool as an example.

To stop the prompts forever—for the rest of your life, set the date to far in the future. For example, the year 3024 instead of 2024.

sh
defaults write ~/Library/GroupContainers/group.com.apple.replayd/ScreenCaptureApprovals.plist "/Applications/Shottr.app/Contents/MacOS/Shottr" -date "3024-09-21 12:40:36 +0000"

You'll need to do this for each app, and afterward logout and login again so that the replayd process recognizes the new defaults.

This work is licensed under CC BY-NC-ND 4.0