2020-05-14 21:18:37 +03:00
|
|
|
mod config;
|
|
|
|
|
mod utils;
|
2019-11-21 01:14:53 +03:00
|
|
|
|
2019-12-17 15:05:24 +03:00
|
|
|
#[derive(Debug, Clone)]
|
2025-03-31 16:18:21 +01:00
|
|
|
pub struct TrackInfo {
|
|
|
|
|
pub title: String,
|
|
|
|
|
pub artist: String,
|
|
|
|
|
pub position: String,
|
|
|
|
|
pub duration: String,
|
|
|
|
|
pub status: String,
|
2019-11-30 03:14:00 +03:00
|
|
|
}
|
|
|
|
|
|
2019-11-21 01:14:53 +03:00
|
|
|
fn main() {
|
2020-05-14 21:18:37 +03:00
|
|
|
let conf = config::read();
|
2025-03-31 16:18:21 +01:00
|
|
|
|
2020-05-14 21:18:37 +03:00
|
|
|
match conf.action {
|
|
|
|
|
config::Action::Cpu => utils::cpu_load_bar(15, &conf),
|
|
|
|
|
config::Action::Mem => utils::mem_load_bar(15, &conf),
|
|
|
|
|
config::Action::Mpris => utils::mpris(&conf),
|
2020-05-14 21:53:41 +03:00
|
|
|
config::Action::Utctime => utils::get_time(true, conf.ut_format),
|
|
|
|
|
config::Action::Localtime => utils::get_time(false, conf.lt_format),
|
2020-05-14 21:18:37 +03:00
|
|
|
config::Action::Mpd => utils::mpd(&conf),
|
2019-11-28 18:00:00 +03:00
|
|
|
}
|
2019-11-21 01:14:53 +03:00
|
|
|
}
|
2025-03-31 16:18:21 +01:00
|
|
|
|