NotAShelf
d0cc9e4fb3
cpu: reduce allocations for EPP values
2025-05-16 05:10:01 +03:00
NotAShelf
5b347eb3e2
cpu: scan all CPUs for available governors; cleanup
2025-05-16 05:00:41 +03:00
NotAShelf
3d4d3b8075
battery: refactor sysfs handler into util module
2025-05-16 04:42:21 +03:00
NotAShelf
a3137ff2d0
battery: bettery error handling in sysfs value reading
2025-05-16 04:03:08 +03:00
NotAShelf
6c2fc6652f
monitor: optimize path search for CPU frequency directory
2025-05-16 03:46:54 +03:00
NotAShelf
e6b7f3eb34
battery: case-insensitive matching for peripherals
2025-05-16 03:32:41 +03:00
NotAShelf
4e03679209
cli: use Clap's value parser for cheaper validation
2025-05-16 03:18:50 +03:00
NotAShelf
8f860424f9
battery: better validation for battery charge thresholds
...
To accommodate vendors that use 0 to mean "charge immediately" or "disable start threshold," we
modified the validation logic to allow start to be 0 *as long as* start is less than stop and
stop is less than OR equal to 100
2025-05-16 03:11:05 +03:00
NotAShelf
622f4f6f32
engine: simplify error handling
2025-05-16 03:06:59 +03:00
NotAShelf
c1d81b687c
battery: deduplicate frequency validation logic
2025-05-16 03:03:35 +03:00
NotAShelf
7d28d12c1c
cpu: update governor override path
2025-05-16 02:20:43 +03:00
NotAShelf
df5ae64c44
cpu: add alternative EPP string formats for better compat
2025-05-16 02:20:09 +03:00
NotAShelf
3d490db734
battery: better threshold setting logic
2025-05-16 02:19:15 +03:00
NotAShelf
cd68ffd054
battery: remove writable path checker
2025-05-16 02:13:44 +03:00
NotAShelf
2a5c00e3a7
battery: skip writable check for power supply path
...
It wouldn't even work, lol.
2025-05-16 02:04:00 +03:00
raf
f4fceed893
Merge branch 'main' into better-battery-mgnmnt
2025-05-16 01:57:23 +03:00
NotAShelf
d3f2442ccc
config: add valid EPB strings; better validation
2025-05-16 01:52:16 +03:00
NotAShelf
e8d7d1ab86
cpu: prevent possible overflow in frequency calculations
2025-05-16 01:42:08 +03:00
NotAShelf
18141d22e1
config: improve EPP value validation
2025-05-16 01:33:38 +03:00
NotAShelf
2256cf25f9
cpu: better governor validation
2025-05-16 01:27:43 +03:00
NotAShelf
09427ccc9a
config: better serialization in config structs
2025-05-16 01:05:37 +03:00
NotAShelf
8252f0d74e
config: better validation of battery charge threshold; update error handling
2025-05-16 00:42:51 +03:00
NotAShelf
eb97689bc7
battery: simplify file permission check and improve threshold inheritance
2025-05-16 00:18:46 +03:00
NotAShelf
d8f609fdef
{core,battery}: better input validation; path, permission and sanity checks
...
- battery: add path existence and writability check for threshold support
- cpu: validate governor and EPP values, and add frequency validation
- engine: validate turbo auto settings for proper configuration
- main: add validation for minimum and maximum frequency inputs
2025-05-16 00:02:09 +03:00
NotAShelf
7b6602ad39
docs: mention profile-specific tresholds taking precedence
2025-05-16 00:01:38 +03:00
raf
1546da382e
Merge pull request #21 from diniamo/nix-package-no-empty-config
...
nix: add package option, avoid config file on empty settings
2025-05-15 23:43:07 +03:00
NotAShelf
6fe322272e
core: validate tresholds at the CLI level
2025-05-15 23:20:08 +03:00
diniamo
723ce1b7b8
nix: add package option, avoid empty config, move to services
2025-05-15 22:17:11 +02:00
NotAShelf
90fd077a67
config: make ProfileConfig
serialisable
2025-05-15 22:58:47 +03:00
NotAShelf
b11bad74d5
battery: perform permission checks upfront
2025-05-15 22:54:02 +03:00
NotAShelf
705fc6c46d
battery: use a reference to SupportedBattery
instead of clones
2025-05-15 22:20:02 +03:00
NotAShelf
7c34ef5aa0
engine: try to handle systems with multiple batteries
2025-05-15 22:07:15 +03:00
NotAShelf
620dc48be0
engine: apply governor override via try_apply_feature
2025-05-15 22:01:45 +03:00
NotAShelf
b215afc9dd
config: streamline treshold validation
2025-05-15 21:46:57 +03:00
NotAShelf
759ba2a10a
battery: tighten treshhold validation
2025-05-15 21:07:05 +03:00
NotAShelf
ded671296a
engine: treat InvalidValueError
same as NotSupported
2025-05-15 21:03:07 +03:00
NotAShelf
44fff2e273
battery: treshold patterns to a constant array
2025-05-15 20:48:44 +03:00
NotAShelf
b9cce7b634
config: prefer a named struct over tuple for battery conf
2025-05-15 20:32:59 +03:00
NotAShelf
45b6672c64
battery: avoid manual flatten; capture each Err
2025-05-15 20:10:23 +03:00
NotAShelf
36807f66c4
core: move batter logic out of cpu module; better hw detection
2025-05-15 20:06:24 +03:00
NotAShelf
587d6a070f
treewide: apply clippy lints; remove dead code
2025-05-15 17:28:56 +03:00
NotAShelf
099e5c4ba6
docs: mention battery management; update sample config
2025-05-15 17:18:43 +03:00
NotAShelf
09a38dd136
core: battery limit management
2025-05-15 17:05:14 +03:00
raf
5531358da2
Merge pull request #19 from NotAShelf/better-sysfs-errs
...
cpu: streamline governor setting; consolidate sharaed logic
2025-05-15 00:10:07 +03:00
NotAShelf
00805d2808
cpu: streamline governor setting; consolidate sharaed logic
2025-05-15 00:05:06 +03:00
raf
61a6f11495
Merge pull request #18 from NotAShelf/better-sysfs-errs
...
cpu: handle sysfs errors more gracefully
2025-05-14 22:22:43 +03:00
NotAShelf
58ba603afc
cpu: handle sysfs errors more gracefully
2025-05-14 18:58:06 +03:00
Bloxx12
8229d7d1fd
nix: fix module assertion
2025-05-14 12:41:39 +02:00
raf
a7cb492b34
Merge pull request #16 from NotAShelf/xdg-base-spec
...
config: follow XDG base spec
2025-05-14 12:47:49 +03:00
Bloxx12
1645c921d7
config: follow XDG base spec
...
moves /etc/superfreq/config.toml to /etc/xdg/superfreq/config.toml
to follow xdg base spec more closely.
2025-05-14 11:38:05 +02:00