mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-01 10:41:03 +02:00
refactor: move various clients to own folder
This commit is contained in:
parent
94693c92e3
commit
4662f60ac5
16 changed files with 21 additions and 25 deletions
4
src/clients/mod.rs
Normal file
4
src/clients/mod.rs
Normal file
|
@ -0,0 +1,4 @@
|
|||
pub mod mpd;
|
||||
pub mod sway;
|
||||
pub mod system_tray;
|
||||
pub mod wayland;
|
|
@ -1,7 +1,7 @@
|
|||
use super::toplevel::{ToplevelEvent, ToplevelInfo};
|
||||
use super::toplevel_manager::listen_for_toplevels;
|
||||
use super::ToplevelChange;
|
||||
use super::{Env, ToplevelHandler};
|
||||
use crate::wayland::toplevel::{ToplevelEvent, ToplevelInfo};
|
||||
use crate::wayland::toplevel_manager::listen_for_toplevels;
|
||||
use crate::wayland::ToplevelChange;
|
||||
use color_eyre::Report;
|
||||
use indexmap::IndexMap;
|
||||
use smithay_client_toolkit::environment::Environment;
|
|
@ -4,11 +4,10 @@ mod toplevel_manager;
|
|||
|
||||
extern crate smithay_client_toolkit as sctk;
|
||||
|
||||
use self::toplevel_manager::ToplevelHandler;
|
||||
pub use crate::wayland::toplevel::{ToplevelChange, ToplevelEvent, ToplevelInfo};
|
||||
use crate::wayland::toplevel_manager::{ToplevelHandling, ToplevelStatusListener};
|
||||
use async_once::AsyncOnce;
|
||||
use lazy_static::lazy_static;
|
||||
pub use toplevel::{ToplevelChange, ToplevelEvent, ToplevelInfo};
|
||||
use toplevel_manager::{ToplevelHandler, ToplevelHandling, ToplevelStatusListener};
|
||||
use wayland_client::{Attached, DispatchData, Interface};
|
||||
use wayland_protocols::wlr::unstable::foreign_toplevel::v1::client::{
|
||||
zwlr_foreign_toplevel_handle_v1::ZwlrForeignToplevelHandleV1,
|
|
@ -1,5 +1,5 @@
|
|||
use crate::wayland::toplevel::{Toplevel, ToplevelEvent};
|
||||
use crate::wayland::LazyGlobal;
|
||||
use super::toplevel::{Toplevel, ToplevelEvent};
|
||||
use super::LazyGlobal;
|
||||
use smithay_client_toolkit::environment::{Environment, GlobalHandler};
|
||||
use std::cell::RefCell;
|
||||
use std::rc;
|
|
@ -1,5 +1,6 @@
|
|||
mod bar;
|
||||
mod bridge_channel;
|
||||
mod clients;
|
||||
mod config;
|
||||
mod icon;
|
||||
mod logging;
|
||||
|
@ -7,8 +8,6 @@ mod modules;
|
|||
mod popup;
|
||||
mod script;
|
||||
mod style;
|
||||
mod sway;
|
||||
mod wayland;
|
||||
|
||||
use crate::bar::create_bar;
|
||||
use crate::config::{Config, MonitorConfig};
|
||||
|
@ -27,8 +26,8 @@ use tokio::runtime::Handle;
|
|||
use tokio::task::block_in_place;
|
||||
|
||||
use crate::logging::install_tracing;
|
||||
use clients::wayland::{self, WaylandClient};
|
||||
use tracing::{debug, error, info};
|
||||
use wayland::WaylandClient;
|
||||
|
||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use crate::clients::wayland::{self, ToplevelChange};
|
||||
use crate::modules::{Module, ModuleInfo, ModuleUpdateEvent, ModuleWidget, WidgetContext};
|
||||
use crate::wayland::ToplevelChange;
|
||||
use crate::{await_sync, icon, wayland};
|
||||
use crate::{await_sync, icon};
|
||||
use color_eyre::Result;
|
||||
use glib::Continue;
|
||||
use gtk::prelude::*;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use super::open_state::OpenState;
|
||||
use crate::clients::wayland::ToplevelInfo;
|
||||
use crate::icon::get_icon;
|
||||
use crate::modules::launcher::{ItemEvent, LauncherUpdate};
|
||||
use crate::modules::ModuleUpdateEvent;
|
||||
use crate::popup::Popup;
|
||||
use crate::wayland::ToplevelInfo;
|
||||
use gtk::prelude::*;
|
||||
use gtk::{Button, IconTheme, Image, Orientation};
|
||||
use indexmap::IndexMap;
|
||||
|
|
|
@ -3,10 +3,9 @@ mod open_state;
|
|||
|
||||
use self::item::{Item, ItemButton, Window};
|
||||
use self::open_state::OpenState;
|
||||
use crate::clients::wayland::{self, ToplevelChange};
|
||||
use crate::icon::find_desktop_file;
|
||||
use crate::modules::{Module, ModuleInfo, ModuleUpdateEvent, ModuleWidget, WidgetContext};
|
||||
use crate::wayland;
|
||||
use crate::wayland::ToplevelChange;
|
||||
use color_eyre::{Help, Report};
|
||||
use glib::Continue;
|
||||
use gtk::prelude::*;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use crate::wayland::ToplevelInfo;
|
||||
use crate::clients::wayland::ToplevelInfo;
|
||||
|
||||
/// Open state for a launcher item, or item window.
|
||||
#[derive(Debug, Clone, Eq, PartialEq, Copy)]
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
mod client;
|
||||
|
||||
use crate::modules::mpd::client::MpdConnectionError;
|
||||
use crate::modules::mpd::client::{get_client, get_duration, get_elapsed};
|
||||
use crate::clients::mpd::{get_client, get_duration, get_elapsed, MpdConnectionError};
|
||||
use crate::modules::{Module, ModuleInfo, ModuleUpdateEvent, ModuleWidget, WidgetContext};
|
||||
use crate::popup::Popup;
|
||||
use color_eyre::Result;
|
|
@ -1,7 +1,5 @@
|
|||
mod client;
|
||||
|
||||
use crate::await_sync;
|
||||
use crate::modules::tray::client::get_tray_event_client;
|
||||
use crate::clients::system_tray::get_tray_event_client;
|
||||
use crate::modules::{Module, ModuleInfo, ModuleUpdateEvent, ModuleWidget, WidgetContext};
|
||||
use color_eyre::Result;
|
||||
use gtk::prelude::*;
|
|
@ -1,6 +1,6 @@
|
|||
use crate::await_sync;
|
||||
use crate::clients::sway::{get_client, get_sub_client};
|
||||
use crate::modules::{Module, ModuleInfo, ModuleUpdateEvent, ModuleWidget, WidgetContext};
|
||||
use crate::sway::{get_client, get_sub_client};
|
||||
use color_eyre::{Report, Result};
|
||||
use gtk::prelude::*;
|
||||
use gtk::Button;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue