modules: Move them all

This commit is contained in:
Kenny Levinsen
2019-08-11 00:52:47 +02:00
parent 2bb0a2f29f
commit eec74ca750
9 changed files with 25 additions and 21 deletions
+12 -15
View File
@@ -19,26 +19,23 @@ use wayland_protocols::wlr::unstable::layer_shell::v1::client::{
zwlr_layer_shell_v1, zwlr_layer_surface_v1, zwlr_layer_shell_v1, zwlr_layer_surface_v1,
}; };
mod backlight;
mod battery;
mod buffer; mod buffer;
mod calendar;
mod clock;
mod color; mod color;
mod draw; mod draw;
mod launcher; mod modules;
mod module;
mod sound;
use crate::backlight::Backlight;
use crate::battery::UpowerBattery;
use crate::buffer::Buffer;
use crate::calendar::Calendar;
use crate::clock::Clock;
use crate::color::Color; use crate::color::Color;
use crate::launcher::Launcher; use crate::buffer::Buffer;
use crate::module::{Input, Module};
use crate::sound::PulseAudio; use crate::modules::backlight::Backlight;
use crate::modules::battery::UpowerBattery;
use crate::modules::calendar::Calendar;
use crate::modules::clock::Clock;
use crate::modules::launcher::Launcher;
use crate::modules::module::{Input, Module};
use crate::modules::sound::PulseAudio;
enum Cmd { enum Cmd {
Exit, Exit,
@@ -1,7 +1,7 @@
use crate::buffer::Buffer; use crate::buffer::Buffer;
use crate::color::Color; use crate::color::Color;
use crate::draw::{draw_bar, draw_box, Font, ROBOTO_REGULAR}; use crate::draw::{draw_bar, draw_box, Font, ROBOTO_REGULAR};
use crate::module::{Input, ModuleImpl}; use crate::modules::module::{Input, ModuleImpl};
use std::fs::OpenOptions; use std::fs::OpenOptions;
use std::io::{Error, ErrorKind}; use std::io::{Error, ErrorKind};
+1 -1
View File
@@ -1,7 +1,7 @@
use crate::buffer::Buffer; use crate::buffer::Buffer;
use crate::color::Color; use crate::color::Color;
use crate::draw::{draw_bar, draw_box, Font, ROBOTO_REGULAR}; use crate::draw::{draw_bar, draw_box, Font, ROBOTO_REGULAR};
use crate::module::{Input, ModuleImpl}; use crate::modules::module::{Input, ModuleImpl};
use std::sync::mpsc::Sender; use std::sync::mpsc::Sender;
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
+1 -1
View File
@@ -1,7 +1,7 @@
use crate::buffer::Buffer; use crate::buffer::Buffer;
use crate::color::Color; use crate::color::Color;
use crate::draw::{Font, DEJAVUSANS_MONO, ROBOTO_REGULAR}; use crate::draw::{Font, DEJAVUSANS_MONO, ROBOTO_REGULAR};
use crate::module::{Input, ModuleImpl}; use crate::modules::module::{Input, ModuleImpl};
use chrono::{Date, DateTime, Datelike, Local}; use chrono::{Date, DateTime, Datelike, Local};
+1 -1
View File
@@ -1,7 +1,7 @@
use crate::buffer::Buffer; use crate::buffer::Buffer;
use crate::color::Color; use crate::color::Color;
use crate::draw::{Font, ROBOTO_REGULAR}; use crate::draw::{Font, ROBOTO_REGULAR};
use crate::module::{Input, ModuleImpl}; use crate::modules::module::{Input, ModuleImpl};
use std::sync::mpsc::Sender; use std::sync::mpsc::Sender;
+1 -1
View File
@@ -1,7 +1,7 @@
use crate::buffer::Buffer; use crate::buffer::Buffer;
use crate::color::Color; use crate::color::Color;
use crate::draw::{Font, ROBOTO_REGULAR}; use crate::draw::{Font, ROBOTO_REGULAR};
use crate::module::{Input, ModuleImpl}; use crate::modules::module::{Input, ModuleImpl};
use std::cell::RefCell; use std::cell::RefCell;
use std::cmp::Ordering; use std::cmp::Ordering;
+7
View File
@@ -0,0 +1,7 @@
pub mod module;
pub mod backlight;
pub mod battery;
pub mod calendar;
pub mod clock;
pub mod launcher;
pub mod sound;
+1 -1
View File
@@ -1,7 +1,7 @@
use crate::buffer::Buffer; use crate::buffer::Buffer;
use crate::color::Color; use crate::color::Color;
use crate::draw::{draw_bar, draw_box, Font, ROBOTO_REGULAR}; use crate::draw::{draw_bar, draw_box, Font, ROBOTO_REGULAR};
use crate::module::{Input, ModuleImpl}; use crate::modules::module::{Input, ModuleImpl};
use std::cell::RefCell; use std::cell::RefCell;
use std::cmp::{max, min}; use std::cmp::{max, min};