Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
87085f9
cpu: clean up, clean main too
RGBCube May 18, 2025
d0932ae
battery: clean up, rename to power_supply
RGBCube May 18, 2025
baef8af
cli: remove governor_persist
RGBCube May 18, 2025
6377480
power_supply: don't ignore non-batteries
RGBCube May 18, 2025
6ef4da9
power_supply&cpu: use objects
RGBCube May 19, 2025
004e8e2
cpu: impl Display for Cpu
RGBCube May 19, 2025
a14d88c
wip unsound broken malfunctioning changes to make it compile
RGBCube May 19, 2025
0ed0f18
main: delete historical logging code
RGBCube May 19, 2025
2704379
power_supply: add derives to PowerSupply
RGBCube May 19, 2025
2995909
power_supply: rename is_battery to get_type and don't compare the type
RGBCube May 19, 2025
0d3a88b
config: nuke old config and implement a new system
RGBCube May 19, 2025
c073b64
config: fix schema, toml does not have top level lists
RGBCube May 19, 2025
ca4b1db
main: move application to deltas, comment out broken modules for now
RGBCube May 19, 2025
b6d4e09
power_supply&cpu: somewhat improve error messages
RGBCube May 19, 2025
f381323
power_supply&cpu: kolor
RGBCube May 19, 2025
0de8105
config: better more enhanched expression
RGBCube May 19, 2025
606cedb
daemon: wip new impl
RGBCube May 19, 2025
4fa59b7
daemon: implement polling_interval
RGBCube May 20, 2025
c062327
daemon: delete some old code and create daemon scaffold
RGBCube May 20, 2025
91cef3b
cpu&power: share fs impls
RGBCube May 20, 2025
543e5a0
fs: fix read() typesig
RGBCube May 20, 2025
137f801
cpu&power: add more attributes
RGBCube May 20, 2025
1ab9ace
cpu: cpu times
RGBCube May 20, 2025
058ef99
cpu: add TODO
RGBCube May 20, 2025
a514f1b
main: use yansi::whenever
RGBCube May 20, 2025
2309678
monitor: delete old code
RGBCube May 20, 2025
d872371
cpu: store frequency
RGBCube May 21, 2025
961d1df
cpu: store governor and available governors
RGBCube May 21, 2025
99feb83
cpu: store EPP and EPB
RGBCube May 21, 2025
07ca582
cpu: set_ep{p,b} actually sets the attributes now
RGBCube May 22, 2025
571f172
cpu: add global turbo querying
RGBCube May 22, 2025
4763b54
cpu: add usage percent
RGBCube May 22, 2025
004b879
power_supply: add more stuff and store them
RGBCube May 22, 2025
a343e38
system: is_ac
RGBCube May 22, 2025
2812baa
system: check for chassis type 31 and move power saving check below
RGBCube May 27, 2025
fd3ae29
cpu: cache /proc/stat
RGBCube May 28, 2025
421d4aa
cpu: wip temperature scanning, waiting for raf to stand up from his d…
RGBCube May 28, 2025
303a844
system: cpu temperatures scanning
RGBCube Jun 4, 2025
ee7ea6b
cpu: add cpu info scanning
RGBCube Jun 4, 2025
1283e5b
delete core.rs
RGBCube Jun 4, 2025
c2325fa
daemon: set charging
RGBCube Jun 4, 2025
7503e23
daemon: add eval
RGBCube Jun 4, 2025
008e05b
cpu: use only recent cpu log entries for calculating volatility
RGBCube Jun 4, 2025
a25ae59
package: rename to watt
RGBCube Jun 4, 2025
b6dd9e7
package: make multicall
RGBCube Jun 4, 2025
917ed77
config: fix serde
RGBCube Jun 4, 2025
2c154cd
expr: strict eval
RGBCube Jun 4, 2025
0e8b402
config: rename rule condition field
RGBCube Jun 4, 2025
3e235c0
daemon: merge cpu deltas
RGBCube Jun 4, 2025
841ea83
system: trim prefixes properly when scanning labels
RGBCube Jun 5, 2025
da3f793
treewide: finish rename
RGBCube Jun 6, 2025
84154fe
treewide: fix typos
RGBCube Jun 6, 2025
661d608
config: add default
RGBCube Jun 11, 2025
c50f5c8
config: integrate default config
RGBCube Jun 11, 2025
100e90d
config: add debug logs
RGBCube Jun 11, 2025
1ba5a1d
daemon: add logs
RGBCube Jun 11, 2025
f7f738c
daemon: more logs
RGBCube Jun 11, 2025
ce83ba3
system: add logs
RGBCube Jun 11, 2025
86b2f55
monitor&engine: delete
RGBCube Jun 12, 2025
fb5ef3d
system: fix thermal zone scanning
RGBCube Jun 12, 2025
e9e1df9
treewide: toml and rust formatter changes
RGBCube Jun 12, 2025
496f5a7
system: update debug log
RGBCube Jun 13, 2025
6ea92c1
address review comments
RGBCube Jun 14, 2025
b4e5dd7
fmt: remove ads (wtf!!)
RGBCube Jun 14, 2025
3c82679
build.rs: remove
RGBCube Jun 14, 2025
a341d08
watt: turn into a library
RGBCube Jun 14, 2025
0e07241
xtask: add completion generation
RGBCube Jun 14, 2025
ef9da17
Revert "treewide: finish renaming to Watt (#36)"
NotAShelf Jun 15, 2025
58830c7
Merge pull request #31 from RGBCube/change-rgbcube-ytsulunonpmv
NotAShelf Jun 15, 2025
e9caae0
config: correct `PowerSupplyCharge` mapping
NotAShelf Jun 15, 2025
590ede9
fs: correct formatting in error context
NotAShelf Jun 15, 2025
a420f38
nix: switch to rustfmt nightly
NotAShelf Jun 15, 2025
dd12456
nix: add taplo to default devshell
NotAShelf Jun 15, 2025
bcc9915
meta: explicitly set README field in cargo config
NotAShelf Jun 15, 2025
eb240be
docs: update README for 1.0.0; document new DSL
NotAShelf Jun 15, 2025
6904297
ci: build and publish documentation
NotAShelf Jun 15, 2025
8709f7a
docs: clarify more behaviour in config, and use sh instead of bash co…
RGBCube Jun 16, 2025
bfe9db6
logs: fix log levels and default log level, and adjust readme to reflect
RGBCube Jun 16, 2025
a4271e5
cli: add --version to multicall commands
RGBCube Jun 16, 2025
56ef567
nix: fix log level to be info
RGBCube Jun 16, 2025
4261449
xtask: clean up code, use set_extension
RGBCube Jun 16, 2025
601665b
meta: add 'dist' task for xtask
NotAShelf Jun 16, 2025
6bbe5c9
nix: update package for 1.0.0
NotAShelf Jun 16, 2025
b544157
meta: ignore generated files
NotAShelf Jun 16, 2025
faff713
docs: elaborate logic properly in readme
RGBCube Jun 16, 2025
334e177
docs: epic improvement to README
NotAShelf Jun 19, 2025
d9fa0e8
nix: enable versionCheckHook again
NotAShelf Jun 19, 2025
d243996
nix: remove 'xtask' binary from output
NotAShelf Jul 26, 2025
5ff9e79
config: extend, add a String type as well
RGBCube Jul 26, 2025
1013e9b
treewide: remove multicall binaries
RGBCube Jul 26, 2025
113753a
config: add List type to Expression
RGBCube Jul 26, 2025
83829d2
config: remove default for Expression
RGBCube Jul 26, 2025
76923ea
config: add List literal
RGBCube Jul 26, 2025
1d4341f
WIP: start moving entire config to Expression
RGBCube Jul 26, 2025
ea8fa6c
daemon: don't coalesce cpu rules for now
RGBCube Jul 27, 2025
5323344
power: make delta config also take Expression
RGBCube Jul 27, 2025
239afff
main: use log::error! rather than printing yourself
RGBCube Jul 27, 2025
313169e
flake: bump nixpkgs
NotAShelf Aug 13, 2025
ae4b541
chore: bump dependency versions; change MSRV to 1.88
NotAShelf Aug 13, 2025
aaf2154
watt: set turbo values conditionally
NotAShelf Aug 21, 2025
9bd3f15
cpu: don't require a epp to be available
RGBCube Sep 9, 2025
3a3c4a5
config: handle undefined value in cpu.turbo eval
NotAShelf Sep 9, 2025
50f0dac
cpu: emit a debug message on governor set
NotAShelf Sep 9, 2025
8a66336
config: add is-governor-available expression
NotAShelf Sep 9, 2025
74e9d35
watt: enable governors conditionally in default config
NotAShelf Sep 9, 2025
48315d8
config: add is-available expressions for epp and epb features
NotAShelf Sep 9, 2025
40cf0c8
docs: update README for new conditional expressions
NotAShelf Sep 9, 2025
a41448c
config: add is-platform-profile-avavilable expression
NotAShelf Sep 9, 2025
e691eb7
watt: set `power.platform-profile` conditionally in default config
NotAShelf Sep 9, 2025
474ee6f
config: remove unused and redundant expressions
RGBCube Sep 9, 2025
7576b13
cpu: some sanity fixes, make it be able to fail
RGBCube Sep 9, 2025
d9423ad
daemon: set turbo and frequency available parameters properly
RGBCube Sep 9, 2025
8ab446e
config: check for frequency availability
RGBCube Sep 9, 2025
4dd72f4
cpu: remove debug log for now
RGBCube Sep 9, 2025
9b2205e
system: fix cpu numbering
RGBCube Sep 9, 2025
02fe416
system: add informative comment
RGBCube Sep 9, 2025
79d20de
watt: use is-available conditionals for epp/epb in default config
NotAShelf Sep 11, 2025
ba2023e
daemon: make `CpuDelta` apply per-CPU expressions with context
NotAShelf Oct 1, 2025
d4cd1fc
config: log when skipping CPU settings due to unmet conditions
NotAShelf Oct 1, 2025
cab57ad
various: improve error handling for cache and log access
NotAShelf Oct 1, 2025
1594d21
chore: bump dependencies
NotAShelf Oct 1, 2025
3e87b70
cpu: maximum frequency should follow *hardware* limit
NotAShelf Oct 23, 2025
b18086d
watt: support `$cpu-frequency-maximum` for max hardware freq.
NotAShelf Oct 23, 2025
220cc1b
watt: support `$cpu-frequency-minimum` for min hardware freq.
NotAShelf Oct 23, 2025
e9c577f
docs: mention hardware frequency vars
NotAShelf Oct 23, 2025
144bafc
nix: use `lib.importTOML` to read Cargo manifest
NotAShelf Nov 15, 2025
445eb76
fix: use context rather than ok_or_else(|| anyhow!(...)) to preserve …
RGBCube Oct 28, 2025
6ff5ce8
{cpu,power_supply}: implement Eq and Hash
RGBCube Oct 28, 2025
eacaf15
config: cleanup
RGBCube Oct 28, 2025
a9ccc13
config: move CpuDelta and PowerDelta to their respective files
RGBCube Oct 28, 2025
77ab6a4
config.expression: add minimum and maximum
RGBCube Oct 28, 2025
500391a
config: sort and drop acronyms
RGBCube Oct 28, 2025
2c1b684
config: reuse all cpus, don't scan over and over again
RGBCube Oct 28, 2025
078a674
treewide: changes
RGBCube Oct 28, 2025
134517d
config: fix some stuff
RGBCube Oct 28, 2025
6fd20f6
{cpu,power_supply}: add is_some methods
RGBCube Nov 19, 2025
85e879f
watt: finish
RGBCube Nov 19, 2025
22e215e
cpu: fix mhz min/max software/hardware separation
RGBCube Nov 19, 2025
11697f2
system: fix power supply log outputting
RGBCube Nov 19, 2025
ae310b5
clean
RGBCube Nov 19, 2025
6bf07c9
flake: bump nixpkgs
NotAShelf Dec 22, 2025
82bdc90
config: round float values to nearest integer w/ warning
NotAShelf Dec 22, 2025
71a8cec
nix: link with clang and lld
NotAShelf Dec 22, 2025
2a9560d
config: add property tests for the rounding changes
NotAShelf Dec 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[alias]
xtask = "run --package xtask --"
66 changes: 66 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: docs
on:
push:
branches: [master]

env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10

permissions:
contents: read
pages: write
id-token: write
concurrency:
group: deploy
cancel-in-progress: false

jobs:
rustdoc:
name: Build API docs
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Configure cache
uses: Swatinem/rust-cache@v2

- name: Setup pages
id: pages
uses: actions/configure-pages@v5

- name: Build Documentation
run: |
cargo clean --doc ; cargo doc --no-deps --workspace --all-features

- name: Add redirect
run: echo '<meta http-equiv="refresh" content="0;url=watt/index.html">' > target/doc/index.html

- name: Remove lock file
run: rm target/doc/.lock

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: target/doc

deploy:
name: Deploy Documentation
runs-on: ubuntu-latest
needs: rustdoc

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,3 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: SHA256SUMS

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
target*
result*
.direnv
.direnv/
bin/
completions/
27 changes: 27 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# float_literal_trailing_zero = "Always" # TODO: Warning for some reason?
condense_wildcard_suffixes = true
doc_comment_code_block_width = 80
edition = "2024" # Keep in sync with Cargo.toml.
enum_discrim_align_threshold = 60
force_explicit_abi = false
force_multiline_blocks = true
format_code_in_doc_comments = true
format_macro_matchers = true
format_strings = true
group_imports = "StdExternalCrate"
hex_literal_case = "Upper"
imports_granularity = "Crate"
imports_layout = "Vertical"
inline_attribute_width = 60
match_block_trailing_comma = true
max_width = 80
newline_style = "Unix"
normalize_comments = true
normalize_doc_attributes = true
overflow_delimited_expr = true
struct_field_align_threshold = 60
tab_spaces = 2
unstable_features = true
use_field_init_shorthand = true
use_try_shorthand = true
wrap_comments = true
13 changes: 13 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[formatting]
align_entries = true
column_width = 100
compact_arrays = false
reorder_inline_tables = true
reorder_keys = true

[[rule]]
include = [ "**/Cargo.toml" ]
keys = [ "package" ]

[rule.formatting]
reorder_keys = false
Loading