ptimer 0.1.0

A simple cli pomodoro timer. It sends notifications to the user when the timer is up. Works on macOS only.
Documentation
use crate::config::Config;
use crate::grpc::connect_client;
use crate::history::print_history;

pub async fn run(config: &Config) {
    let mut client = connect_client(config).await.unwrap_or_else(|| {
        println!("ptimer is not running");
        print_history(config, false, false);
        std::process::exit(0);
    });
    match client.status(tonic::Request::new(crate::timer_grpc::Empty {})).await {
        Ok(state) => {
            state.into_inner().pretty_print();
        }
        Err(err) => {
            dbg!(err);
        }
    }
}