mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-07 05: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
|
@ -7,6 +7,7 @@ use crate::modules::script::ScriptModule;
|
|||
use crate::modules::sysinfo::SysInfoModule;
|
||||
use crate::modules::tray::TrayModule;
|
||||
use crate::modules::workspaces::WorkspacesModule;
|
||||
use crate::script::ScriptInput;
|
||||
use color_eyre::eyre::{Context, ContextCompat};
|
||||
use color_eyre::{eyre, Help, Report};
|
||||
use dirs::config_dir;
|
||||
|
@ -18,6 +19,13 @@ use std::path::{Path, PathBuf};
|
|||
use std::{env, fs};
|
||||
use tracing::instrument;
|
||||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub struct CommonConfig {
|
||||
pub show_if: Option<ScriptInput>,
|
||||
pub on_click: Option<ScriptInput>,
|
||||
pub tooltip: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
#[serde(tag = "type", rename_all = "kebab-case")]
|
||||
pub enum ModuleConfig {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue