Flatten swayrbar structure

main
Tassilo Horn 3 years ago
parent 80a8a3a262
commit a2e1b3343c
  1. 7
      swayrbar/src/bar.rs
  2. 2
      swayrbar/src/bin/swayrbar.rs
  3. 4
      swayrbar/src/config.rs
  4. 2
      swayrbar/src/lib.rs
  5. 2
      swayrbar/src/module.rs
  6. 4
      swayrbar/src/module/battery.rs
  7. 4
      swayrbar/src/module/date.rs
  8. 4
      swayrbar/src/module/sysinfo.rs
  9. 4
      swayrbar/src/module/window.rs

@ -15,7 +15,9 @@
//! `swayrbar` lib.
use crate::bar::module::BarModuleFn;
use crate::config;
use crate::module;
use crate::module::BarModuleFn;
use env_logger::Env;
use serde_json;
use std::io;
@ -23,9 +25,6 @@ use std::process as p;
use std::{sync::Arc, thread};
use swaybar_types as sbt;
pub mod config;
pub mod module;
pub fn start() {
env_logger::Builder::from_env(Env::default().default_filter_or("warn"))
.init();

@ -18,5 +18,5 @@
fn main() {
// TODO: We need a config file cmd line option so that each bar can have
// its own config.
swayrbar::bar::start();
swayrbar::bar::start()
}

@ -15,7 +15,7 @@
//! TOML configuration for swayrbar.
use crate::bar::module::BarModuleFn;
use crate::module::BarModuleFn;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
@ -44,7 +44,7 @@ impl Default for Config {
refresh_interval: 1000,
modules: vec!["date/0".to_owned()],
module_configs: vec![
crate::bar::module::date::BarModuleDate::default_config(
crate::module::date::BarModuleDate::default_config(
"0".to_owned(),
),
],

@ -14,4 +14,6 @@
// this program. If not, see <https://www.gnu.org/licenses/>.
pub mod bar;
pub mod config;
pub mod module;
pub mod shared;

@ -15,7 +15,7 @@
use std::collections::HashMap;
use crate::bar::config;
use crate::config;
use swaybar_types as s;
pub mod battery;

@ -15,8 +15,8 @@
//! The date `swayrbar` module.
use crate::bar::config;
use crate::bar::module::BarModuleFn;
use crate::config;
use crate::module::BarModuleFn;
use crate::shared::fmt::format_placeholders;
use battery as bat;
use std::collections::{HashMap, HashSet};

@ -17,8 +17,8 @@
use std::collections::HashMap;
use crate::bar::module::config;
use crate::bar::module::BarModuleFn;
use crate::module::config;
use crate::module::BarModuleFn;
use swaybar_types as s;
const NAME: &str = "date";

@ -15,8 +15,8 @@
//! The date `swayrbar` module.
use crate::bar::config;
use crate::bar::module::BarModuleFn;
use crate::config;
use crate::module::BarModuleFn;
use crate::shared::fmt::format_placeholders;
use std::collections::HashMap;
use std::sync::Mutex;

@ -17,8 +17,8 @@
use std::collections::HashMap;
use crate::bar::config;
use crate::bar::module::BarModuleFn;
use crate::config;
use crate::module::BarModuleFn;
use crate::shared::fmt::format_placeholders;
use crate::shared::ipc;
use crate::shared::ipc::NodeMethods;
Loading…
Cancel
Save