Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/F0903/AutoPower
Browse files Browse the repository at this point in the history
  • Loading branch information
F0903 committed Sep 12, 2024
2 parents 864323c + 1716821 commit 11baa9b
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AutoPower

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.
A small, efficient and configurable Windows service that switches your Windows laptop's power mode and refresh rate when plugged in and out of power.

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.

Expand All @@ -15,15 +15,38 @@ Uses minimal CPU, as code only runs when you plug your laptop in or out of power
- Everything should now work!
- It is recommended to restart your PC afterwards, as this makes it work reliably.

## Customization
## Configuration

After the service has started, a ´config.json´ file should appear in the installation directory.
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.

### Configuring power schemes

In `config.json`, you can configure the `power_scheme` field in either `wired_config` or `battery_config` with the following values:

#### High Performance
```json
"power_scheme": "HighPerformance",
```
#### Balanced
```json
"power_scheme": "Balanced",
```
#### Power Saver [(cannot be used with modern standby)](https://learn.microsoft.com/en-us/windows/win32/power/power-policy-settings)
```json
"power_scheme": "PowerSaver",
```
#### Custom
```json
"power_scheme": {
"Custom": "**your_custom_guid***"
},
```

## Building

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

0 comments on commit 11baa9b

Please sign in to comment.