generated from PlexSheep/rs-base
Compare commits
2 commits
6512cad419
...
90656af7aa
Author | SHA1 | Date | |
---|---|---|---|
90656af7aa | |||
7ab1e71170 |
2 changed files with 12 additions and 12 deletions
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "crock"
|
name = "crock"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = true
|
publish = true
|
||||||
authors = ["Christoph J. Scherr <software@cscherr.de>"]
|
authors = ["Christoph J. Scherr <software@cscherr.de>"]
|
||||||
|
@ -10,6 +10,7 @@ readme = "README.md"
|
||||||
homepage = "https://git.cscherr.de/PlexSheep/crock"
|
homepage = "https://git.cscherr.de/PlexSheep/crock"
|
||||||
repository = "https://git.cscherr.de/PlexSheep/crock"
|
repository = "https://git.cscherr.de/PlexSheep/crock"
|
||||||
keywords = ["time", "clock", "tui"]
|
keywords = ["time", "clock", "tui"]
|
||||||
|
categories = ["date-and-time"]
|
||||||
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
21
src/main.rs
21
src/main.rs
|
@ -1,24 +1,23 @@
|
||||||
|
#![warn(clippy::pedantic, clippy::style, clippy::nursery)]
|
||||||
|
#![allow(clippy::question_mark_used)]
|
||||||
|
|
||||||
use chrono::SubsecRound;
|
use chrono::SubsecRound;
|
||||||
use ratatui::{
|
use ratatui::crossterm::event::{
|
||||||
backend::CrosstermBackend,
|
self, poll, DisableMouseCapture, EnableMouseCapture, Event, KeyCode, KeyModifiers,
|
||||||
crossterm::event::poll,
|
|
||||||
layout::{Constraint, Direction, Layout, Rect},
|
|
||||||
style::Style,
|
|
||||||
widgets::{Block, Borders, Paragraph},
|
|
||||||
Terminal,
|
|
||||||
};
|
};
|
||||||
use ratatui::{
|
use ratatui::{
|
||||||
|
backend::CrosstermBackend,
|
||||||
crossterm::{
|
crossterm::{
|
||||||
event::{self, DisableMouseCapture, EnableMouseCapture, Event, KeyCode, KeyModifiers},
|
|
||||||
execute,
|
execute,
|
||||||
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
|
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
|
||||||
},
|
},
|
||||||
style::Stylize,
|
layout::{Constraint, Direction, Layout, Rect},
|
||||||
|
style::{Style, Stylize},
|
||||||
|
widgets::Paragraph,
|
||||||
|
Terminal,
|
||||||
};
|
};
|
||||||
use std::{io, time::Duration};
|
use std::{io, time::Duration};
|
||||||
|
|
||||||
const TITLE: &str = "Crock";
|
|
||||||
|
|
||||||
fn main() -> Result<(), io::Error> {
|
fn main() -> Result<(), io::Error> {
|
||||||
// setup terminal
|
// setup terminal
|
||||||
enable_raw_mode()?;
|
enable_raw_mode()?;
|
||||||
|
|
Reference in a new issue