Skip to content

Instantly share code, notes, and snippets.

@lambdan
Created June 6, 2020 17:25
Show Gist options
  • Save lambdan/fad2945a39667e287856775ac96c1da6 to your computer and use it in GitHub Desktop.
Save lambdan/fad2945a39667e287856775ac96c1da6 to your computer and use it in GitHub Desktop.
Toggle macOS Screenshot Shadows
#!/bin/bash
# If you never disabled shadows before there will be an error on your
# first run because the disable-shadow key does not exist yet
current=$(defaults read com.apple.screencapture disable-shadow)
if [ "$current" -eq "1" ]
then
echo "Shadows are disabled, Enabling them..."
defaults write com.apple.screencapture disable-shadow -bool false
else
echo "Shadows are enabled, Disabling them..."
defaults write com.apple.screencapture disable-shadow -bool true
fi
echo "Restarting SystemUIServer..."
killall SystemUIServer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment