made it more sexable
This commit is contained in:
parent
c816c1025e
commit
793ed4d730
|
@ -23,7 +23,7 @@ impl DimPlugin for Plug {
|
|||
fn init(&mut self) {
|
||||
}
|
||||
fn poll(&mut self, f: &mut dim_sdk::CBuffer) -> dim_sdk::Result<()> {
|
||||
let contents = read_to_string("/home/xomf/battery_test")?;
|
||||
let contents = read_to_string("/sys/class/power_supply/BAT0/capacity")?;
|
||||
let cleaned_contents: String = contents.chars().filter(|c| c.is_digit(10)).collect();
|
||||
|
||||
write!(f, "Battery: {}%", cleaned_contents)?;
|
||||
|
|
Loading…
Reference in New Issue
Block a user