mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-17 14:51:04 +02:00
feat: new sway-mode module (#671)
* feat: add sway-mode module * refactor: Avoid making multiple connections to SwayIPC Now `sway::Client` is store in `ironbar.clients`, and allow dynamically registering event listeners, instead of hardcoding events for Workspace updates. Remove the use of `swayipc::Connection` from `sway-mode` module, and replace it with the new event listener system. #671
This commit is contained in:
parent
4f2f890c93
commit
e307e15dc4
11 changed files with 411 additions and 72 deletions
|
@ -21,6 +21,8 @@ use crate::modules::networkmanager::NetworkManagerModule;
|
|||
#[cfg(feature = "notifications")]
|
||||
use crate::modules::notifications::NotificationsModule;
|
||||
use crate::modules::script::ScriptModule;
|
||||
#[cfg(feature = "sway")]
|
||||
use crate::modules::sway::mode::SwayModeModule;
|
||||
#[cfg(feature = "sys_info")]
|
||||
use crate::modules::sysinfo::SysInfoModule;
|
||||
#[cfg(feature = "tray")]
|
||||
|
@ -69,6 +71,8 @@ pub enum ModuleConfig {
|
|||
Script(Box<ScriptModule>),
|
||||
#[cfg(feature = "sys_info")]
|
||||
SysInfo(Box<SysInfoModule>),
|
||||
#[cfg(feature = "sway")]
|
||||
SwayMode(Box<SwayModeModule>),
|
||||
#[cfg(feature = "tray")]
|
||||
Tray(Box<TrayModule>),
|
||||
#[cfg(feature = "upower")]
|
||||
|
@ -114,6 +118,8 @@ impl ModuleConfig {
|
|||
Self::Script(module) => create!(module),
|
||||
#[cfg(feature = "sys_info")]
|
||||
Self::SysInfo(module) => create!(module),
|
||||
#[cfg(feature = "sway")]
|
||||
Self::SwayMode(module) => create!(module),
|
||||
#[cfg(feature = "tray")]
|
||||
Self::Tray(module) => create!(module),
|
||||
#[cfg(feature = "upower")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue