2026 January 31

A bash function to toggle MacOS reduce-motion setting

I was testing out using the multi-page view transitions CSS feature on this site, and wanted to quickly compare the on versus off behavior.

I had Claude whip up this little utility function, which is working perfectly for me!

function toggle-reduce-motion {
    local current=$(defaults read com.apple.universalaccess reduceMotion 2>/dev/null || echo "0")
    if [[ "$current" == "1" ]]; then
        defaults write com.apple.universalaccess reduceMotion -bool false
        echo "Reduce motion: OFF"
    else
        defaults write com.apple.universalaccess reduceMotion -bool true
        echo "Reduce motion: ON"
    fi
}

You can see it here in my dotfiles.

Back to all notes