aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.rs15
-rw-r--r--src/lib.rs3
2 files changed, 17 insertions, 1 deletions
diff --git a/src/config.rs b/src/config.rs
index 6ee2d17..22f37b6 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -1,5 +1,7 @@
use getopts::Options;
+type Milliseconds = u16;
+
#[repr(C)]
#[derive(Default)]
struct Args {
@@ -8,9 +10,20 @@ struct Args {
}
#[repr(C)]
-#[derive(Default)]
+#[derive(Deserialize)]
pub struct Config {
+ #[serde(skip)]
args: Args,
+ timeout: Milliseconds,
+}
+
+impl Default for Config {
+ fn default() -> Self {
+ Config {
+ args: Args::default(),
+ timeout: 500,
+ }
+ }
}
fn print_usage(opts: Options) {
diff --git a/src/lib.rs b/src/lib.rs
index ed9e9c3..300cc66 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -15,6 +15,9 @@ extern crate log;
#[macro_use]
extern crate objc;
+
+#[macro_use]
+extern crate serde_derive;
extern crate stderrlog;
extern crate xdg;