aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
blob: 59ed28dd135f6b246c2b1ca2e5712ddccf1b3968 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
mod buffer;
mod db;
mod window;

use crate::buffer::{Client, Buffer};
use crate::buffer::Threads;

use std::io::{stdin, stdout};
use termion::raw::IntoRawMode;

fn main() {
    let stdin = stdin();
    let screen = stdout().into_raw_mode().unwrap();
    // let screen = AlternateScreen::from(screen);

    // hide the cursor
    let mut screen = termion::cursor::HideCursor::from(screen);

    let threads = Threads::from_query(String::from("tag:inbox"));

    let client = Client::new(Buffer::Threads(threads), &mut screen);
    client.run(&mut screen, stdin);
}