// Name: macOS Window Animations // Description: Enable smooth macOS-style animations for all windows // Author: NinjaBeameR import "@johnlindquist/kit" const animationSettings = await arg("Select animation type:", [ { name: "Enable All Animations", description: "Turn on all macOS window animations", value: "enable-all" }, { name: "Disable All Animations", description: "Turn off all macOS window animations for performance", value: "disable-all" }, { name: "Reduce Motion", description: "Enable reduced motion for accessibility", value: "reduce-motion" }, { name: "Custom Animation Speed", description: "Set custom animation duration", value: "custom-speed" } ]) switch (animationSettings) { case "enable-all": await applescript(` tell application "System Events" tell appearance preferences set reduce motion to false end tell end tell `) // Enable window animations await exec(`defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool true`) await exec(`defaults write NSGlobalDomain NSWindowResizeTime -float 0.2`) await exec(`defaults write com.apple.dock expose-animation-duration -float 0.1`) await exec(`defaults write com.apple.dock springboard-show-duration -float 0.3`) await exec(`defaults write com.apple.dock springboard-hide-duration -float 0.3`) await notify({ title: "Animations Enabled", body: "All macOS window animations have been enabled" }) break case "disable-all": await applescript(` tell application "System Events" tell appearance preferences set reduce motion to true end tell end tell `) // Disable window animations await exec(`defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false`) await exec(`defaults write NSGlobalDomain NSWindowResizeTime -float 0.001`) await exec(`defaults write com.apple.dock expose-animation-duration -float 0.001`) await exec(`defaults write com.apple.dock springboard-show-duration -float 0.001`) await exec(`defaults write com.apple.dock springboard-hide-duration -float 0.001`) await notify({ title: "Animations Disabled", body: "All macOS window animations have been disabled for better performance" }) break case "reduce-motion": await applescript(` tell application "System Events" tell appearance preferences set reduce motion to true end tell end tell `) await notify({ title: "Reduce Motion Enabled", body: "Motion has been reduced for accessibility" }) break case "custom-speed": const speed = await arg("Enter animation speed (0.1 = fast, 1.0 = slow):", { placeholder: "0.2" }) const animationSpeed = parseFloat(speed) || 0.2 await exec(`defaults write NSGlobalDomain NSWindowResizeTime -float ${animationSpeed}`) await exec(`defaults write com.apple.dock expose-animation-duration -float ${animationSpeed / 2}`) await exec(`defaults write com.apple.dock springboard-show-duration -float ${animationSpeed * 1.5}`) await exec(`defaults write com.apple.dock springboard-hide-duration -float ${animationSpeed * 1.5}`) await notify({ title: "Custom Animation Speed Set", body: `Animation speed set to ${animationSpeed}s` }) break } // Restart Dock to apply changes await exec(`killall Dock`) await div(md(` # Animation Settings Applied ✨ The changes have been applied to your macOS system. Some changes may require logging out and back in to take full effect. ## What was changed: - Window resize animations - Dock animations - Expose/Mission Control animations - App launch animations **Note:** The Dock was restarted to apply the changes immediately. `))