
If you’re using a high-refresh-rate laptop, you probably enjoy the buttery-smooth visuals while gaming or working on AC power. But when you’re on battery, that 120Hz or 144Hz display becomes a silent battery drainer. So I built a script that automatically switches your laptop’s refresh rate based on your power source — 60Hz on battery, max refresh rate when plugged in.
Let me walk you through what it does, why it’s useful, and how you can use it yourself.
🎯 Why I Built This
Modern laptops often support high refresh rates, but that comes at a cost: battery life. Many users manually switch refresh rates depending on whether they’re plugged in or not, but let’s be honest — who remembers to do that every time?
So, I automated the process.
⚙️ What the Script Does
The script checks your laptop’s power status and automatically changes the screen refresh rate:
- On Battery Power: Sets refresh rate to 60Hz to save battery.
- Plugged In: Boosts it to your screen’s maximum refresh rate for smoother performance.
It’s lightweight, uses native tools like PowerShell
& Task Scheduler to make the switch seamlessly.