KeyRoutines
ConditionFreecond.power.source

Check if your laptop is plugged in or on battery

Plugged in or on battery checks whether the PC is running on mains power or on its battery right now. It lets one routine choose between a full-power and a battery-saving setup.

How it works

  • Choose plugged in or on battery.
  • It follows Windows' power notifications, so a Wait until reacts the moment the charger is connected or removed.
  • Use it inside an If, a Wait until, or anywhere a condition fits.

Routines that use it

Performance only on the charger

When your game starts, an If on plugged in runs Set power plan to High performance, otherwise Balanced.

Brightness per power source

At unlock, Set brightness goes to 100% when plugged in and 60% on battery.

Wait for the charger

Before a long render, Wait until the PC is plugged in, then Keep awake for the rest of the run.

Questions

Can a routine act differently on battery?
Yes. Put an If with Plugged in or on battery at the start and give each branch its own steps, such as a different power plan or brightness.
Does it react straight away when I unplug?
Yes, when used in a Wait until it follows Windows' power notifications. To start a routine on unplugging, use the Plugged in or unplugged trigger.

Pairs well with

Build this routine in KeyRoutines

Free from the Microsoft Store for Windows 11 and 10. Pro is a one-time upgrade.