aboutsummaryrefslogtreecommitdiff
path: root/src/config/battery.rs
blob: 5f7eaeaa7a1dff35f0223d7094e20abd85a4ae90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use serde::{Deserialize, Serialize};
use std::default::Default;

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Battery {
    pub source: String,
    pub icon: String,
    pub enabled: bool,
    pub delay: f64,
}

impl Default for Battery {
    fn default() -> Self {
        Battery {
            source: String::from("BAT0"),
            icon: String::from(""),
            enabled: false,
            delay: 120.0,
        }
    }
}