M README.md => README.md +12 -15
@@ 1,38 1,35 @@
# citron
citron provides system data via on-demand notifications, it is essentially an
-alternative to status bars that is meant to be used through keybindings defined
-in your window manager's configuration.
+alternative to status bars, meant to be used through keybindings defined in
+your window manager's configuration.
It is designed to stay out of your way. The moment you want to know something,
-like today's date for example, you tap a keybinding — and instantly, a
-notification pops up with the data you requested, and then simply goes away
-after a few seconds.
+like today's date for example, you hit a keybinding — and instantly, a
+notification pops up with the data you requested, and then disappears a few
+seconds later.
## Contributing and bug reports
-- We accept contributions via email at
- [~grtcdr/citron@lists.sr.ht](mailto:~grtcdr/citron@lists.sr.ht).
-- Issues should be filed in [our ticket
- tracker](https://todo.sr.ht/~grtcdr/citron).
+- We accept contributions via email at [~grtcdr/citron@lists.sr.ht](mailto:~grtcdr/citron@lists.sr.ht).
+- Issues should be filed in [our ticket tracker](https://todo.sr.ht/~grtcdr/citron).
## Installation
-Check out the [installation wiki page](https://man.sr.ht/~grtcdr/citron/install.md).
+See the [installation wiki page](https://man.sr.ht/~grtcdr/citron/install.md).
## Getting started
-Check out the [main wiki page](https://man.sr.ht/~grtcdr/citron/).
+See the [main wiki page](https://man.sr.ht/~grtcdr/citron/).
## Configuration
-Check out the [configuration wiki page](https://man.sr.ht/~grtcdr/citron/configure.md).
+See the [configuration wiki page](https://man.sr.ht/~grtcdr/citron/configure.md).
## Acknowledgements
-- Thank you to
- [pin@NetBSD.org](https://pkgsrc.se/bbmaint.php?maint=pin@NetBSD.org) for
- packaging and maintaining citron on NetBSD.
+- Thank you to [pin@NetBSD.org](https://pkgsrc.se/bbmaint.php?maint=pin@NetBSD.org)
+ for packaging and maintaining citron on NetBSD.
## Screenshot
R src/options.rs => src/cli.rs +1 -1
@@ 87,7 87,7 @@ impl FromStr for Subcommand {
#[derive(Debug, StructOpt, Default)]
#[structopt(settings = &[AppSettings::ArgsNegateSubcommands, AppSettings::ArgRequiredElseHelp, AppSettings::DisableHelpSubcommand])]
-pub struct Options {
+pub struct Flags {
/// Notifies you about your system's uptime.
#[structopt(subcommand, help = "Send a notification with uptime information")]
pub cmd: Option<Subcommand>,
M src/main.rs => src/main.rs +3 -4
@@ 1,17 1,16 @@
#![allow(unused_must_use)]
+mod cli;
mod config;
mod fmt;
-
mod icon;
mod notifier;
-mod options;
mod read;
+use cli::{Flags, Subcommand};
use config::Config;
use icon::Icon;
use notifier::{Notifier, Title};
-use options::{Options, Subcommand};
use structopt::StructOpt;
pub enum Stream {
@@ 22,7 21,7 @@ pub enum Stream {
fn main() {
let mut notifier = Notifier::new();
let mut icon = Icon::new();
- let opt = Options::from_args();
+ let opt = Flags::from_args();
let config = Config::read_config().unwrap_or_default();
if opt.themes {
M src/notifier.rs => src/notifier.rs +2 -4
@@ 1,9 1,7 @@
-use crate::options::Subcommand;
-
+use crate::cli::Subcommand;
use libmacchina::traits::ReadoutError;
use notify_rust::Notification;
use notify_rust::Timeout;
-
use std::fmt;
use std::path::PathBuf;
@@ 47,8 45,8 @@ impl Notifier {
}
}
-/// The title of a notification
#[derive(Debug, PartialEq, Clone)]
+/// The title of a notification
pub enum Title {
Date,
Uptime,