Skip to content

A little utility to monitor whether a machine is on battery or ac power and run a command when that changes.

License

Notifications You must be signed in to change notification settings

bdwalton/powermon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

powermon

This is a little utility to monitor power state changes between AC and BATTERY, running a command any time there is a state transition. This allows you to devise a script that configures whatever default settings you want for power saving while on battery and switch back to full performance when plugged in.

The script that is executed should accept a single argument, which will be one of "UNKNOWN", "ON_BATTERY" or "AC_POWER".

Flags

  • action

    • an executable to run, which accepts a single parameter
    • environment variable expansion is done on the value of the string
  • logfile

    • a path to send log output to
  • verbose

    • enable logging

License

powermon is available under the Simplified BSD License; see LICENSE for the full text.

About

A little utility to monitor whether a machine is on battery or ac power and run a command when that changes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages