Use energy instead of charge in battery tile

This commit is contained in:
Artemis Tosini 2023-09-25 00:52:23 +00:00
parent 33be108857
commit ea274f26c9
Signed by: artemist
GPG key ID: EE5227935FE3FF18
3 changed files with 4 additions and 2 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
/result /result
/target /target
/.direnv

View file

@ -13,7 +13,7 @@ pub async fn battery_stream(config: BatteryConfig) {
loop { loop {
let charge_now = async { let charge_now = async {
let mut raw = String::new(); let mut raw = String::new();
File::open(base_path.join("charge_now")) File::open(base_path.join("energy_now"))
.await? .await?
.read_to_string(&mut raw) .read_to_string(&mut raw)
.await?; .await?;
@ -22,7 +22,7 @@ pub async fn battery_stream(config: BatteryConfig) {
}; };
let charge_total = async { let charge_total = async {
let mut raw = String::new(); let mut raw = String::new();
File::open(base_path.join("charge_full")) File::open(base_path.join("energy_full"))
.await? .await?
.read_to_string(&mut raw) .read_to_string(&mut raw)
.await?; .await?;