mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-04 04:01:03 +02:00
feat: common module options (show_if
, on_click
, tooltip
)
The first three of many options that are common to all modules. Resolves #36. Resolves partially #34.
This commit is contained in:
parent
a3f90adaf1
commit
c9e66d4664
15 changed files with 600 additions and 125 deletions
|
@ -1,5 +1,6 @@
|
|||
use crate::await_sync;
|
||||
use crate::clients::system_tray::get_tray_event_client;
|
||||
use crate::config::CommonConfig;
|
||||
use crate::modules::{Module, ModuleInfo, ModuleUpdateEvent, ModuleWidget, WidgetContext};
|
||||
use color_eyre::Result;
|
||||
use gtk::prelude::*;
|
||||
|
@ -14,7 +15,10 @@ use tokio::sync::mpsc;
|
|||
use tokio::sync::mpsc::{Receiver, Sender};
|
||||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub struct TrayModule;
|
||||
pub struct TrayModule {
|
||||
#[serde(flatten)]
|
||||
pub common: CommonConfig,
|
||||
}
|
||||
|
||||
/// Gets a GTK `Image` component
|
||||
/// for the status notifier item's icon.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue