From ea274f26c9fc3a1adc88b9b80dd67f35330f65a3 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Mon, 25 Sep 2023 00:52:23 +0000 Subject: [PATCH] Use energy instead of charge in battery tile --- .envrc | 1 + .gitignore | 1 + src/tiles/battery.rs | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 .envrc diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index 97e3b2f..a1f7cb3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /result /target +/.direnv diff --git a/src/tiles/battery.rs b/src/tiles/battery.rs index c0e9e0e..7d44bcd 100644 --- a/src/tiles/battery.rs +++ b/src/tiles/battery.rs @@ -13,7 +13,7 @@ pub async fn battery_stream(config: BatteryConfig) { loop { let charge_now = async { let mut raw = String::new(); - File::open(base_path.join("charge_now")) + File::open(base_path.join("energy_now")) .await? .read_to_string(&mut raw) .await?; @@ -22,7 +22,7 @@ pub async fn battery_stream(config: BatteryConfig) { }; let charge_total = async { let mut raw = String::new(); - File::open(base_path.join("charge_full")) + File::open(base_path.join("energy_full")) .await? .read_to_string(&mut raw) .await?;