A bash function to toggle MacOS reduce-motion setting               [ Home ](https://davidharting.com) [ Notes ](https://davidharting.com/notes) [ Media Log ](https://davidharting.com/media) [ Pages ](https://davidharting.com/pages)  [ Login ](https://davidharting.com/login)

  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!

```bash
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](https://github.com/davidharting/dotfiles/blob/3ad28eec9eb76d6ac675b35f0f33c9ce7203f61e/zsh/zshrc#L33) in my dotfiles.

  [ Back to all notes ](https://davidharting.com/notes)
