Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
F0903 authored Sep 10, 2024
1 parent 638ca32 commit ab82e4e
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,35 @@
# AutoPower

A small and efficient Windows service that automatically switches your laptop between the Balanced and High Performance power modes when you plug it in or out of power, and sends you a notification.
A small, efficient and customizable Windows service that switches your Windows laptop's power mode and refresh rate when plugged in and out of power.

Uses virtually no CPU, as code only runs when you plug your laptop in or out of power. It also allocates minimal memory, so you don't need to worry about any performance impact when the service is running.
Uses minimal CPU, as code only runs when you plug your laptop in or out of power. It also allocates minimal memory, so you don't need to worry about any performance impact when the service is running.

## Installation

**Note: Only Windows 11/10 is supported due to API requirements.**
**Note: Only Windows 10 AND ABOVE is supported due to API requirements.**
**Note: Beware that antivirus might flag the service or install scripts.**

Download the files from the latest release (recommended), or the build artifacts of the latest commit (not recommended).
Afterwards, copy both the autopower.exe, autopower_notification_provider.exe, and all .ps1 files from the folder to your desired location (recommended to be a non-admin folder).
Then simply run the install_service.ps1 script, and everything should work!
After this, the service will start automatically with your PC.
- Download the release.zip from the latest release.
- Copy both .exe files and all .ps1 scripts to your desired location (recommended to be a non-admin location like 'C:\autopower\').
- Run the install_service.ps1 script.
- Everything should now work!
- It is recommended to restart your PC afterwards, as this makes it work reliably.

## Customization

After the service has started, a ´config.json´ file should appear in the installation directory.
Here you can change options for both the wired and battery powered configurations, such as the refresh rate, power scheme, and whether or not you want a desktop notification or if you want the service change the refresh rate at all.

You do not need to restart the service to load the new changes, as the config file is read each time the power state changes.

Beware that an invalid configuration will override the whole file with the defaults.

## Building

Important to build with the command `cargo build --release --workspace` so all binaries gets built.
It's important to use the `--workspace` switch when building so all binaries get built. (eg. `cargo build --release --workspace`)

## Uninstallation

Open the directory where you placed the service executable, then just run the uninstall_service.ps1 script. Note that a restart might be required to completely remove it.
Afterwards you can delete the directory.
- Open your installation directory.
- Run uninstall_service.ps1.
- After this you can manually delete the installation directory.

0 comments on commit ab82e4e

Please sign in to comment.