Auto Sync only when on Wi-Fi & Charging

Auto Sync only when on Wi-Fi & Charging would be great. Currently kills my battery.