1

rewrite: single file, zero deps, Windows API, logging, CLI flags

This commit is contained in:
2026-06-19 21:37:01 +03:00
parent c8648da296
commit c3cb8ae847
6 changed files with 302 additions and 114 deletions
+36 -1
View File
@@ -1,3 +1,38 @@
# autoPriority
A program that automatically sets a high priority for game processes
Automatically sets high CPU priority for memory-heavy processes.
## Build
```
# Standard build (with console window)
go build -o autopriority.exe .
# Background build (no console, minimal size)
go build -ldflags="-H windowsgui -s -w" -o autopriority.exe .
```
## Usage
```
autopriority [flags]
```
| Flag | Default | Description |
|-------------|---------------|----------------------------------|
| `-mem` | 536870912 | Memory threshold in bytes |
| `-interval` | 1m0s | Scan interval (min 10s) |
| `-dry-run` | false | Log only, don't change priority |
| `-log` | true | Write `autopriority.log` file |
## Auto-start
Place a shortcut to `autopriority.exe` in:
```
shell:startup
```
## Dependencies
None. Uses only Windows API (kernel32, psapi) via raw syscall.