Merge branch 'rust_rewrite' of git.mcorangehq.xyz:XOR64/dim into rust_rewrite
This commit is contained in:
		
						commit
						8693e10979
					
				| 
						 | 
				
			
			@ -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