mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-01 02:31:04 +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,3 +1,4 @@
|
|||
use crate::config::CommonConfig;
|
||||
use crate::modules::{Module, ModuleInfo, ModuleUpdateEvent, ModuleWidget, WidgetContext};
|
||||
use crate::popup::Popup;
|
||||
use chrono::{DateTime, Local};
|
||||
|
@ -18,7 +19,10 @@ pub struct ClockModule {
|
|||
/// Detail on available tokens can be found here:
|
||||
/// <https://docs.rs/chrono/latest/chrono/format/strftime/index.html>
|
||||
#[serde(default = "default_format")]
|
||||
pub(crate) format: String,
|
||||
format: String,
|
||||
|
||||
#[serde(flatten)]
|
||||
pub common: CommonConfig,
|
||||
}
|
||||
|
||||
fn default_format() -> String {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue