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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::config::Config;
use crate::grpc::connect_client;

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