mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-04-19 19:34:24 +02:00
fix: add JSON schema derivation, move dep declaration back to bottom
This commit is contained in:
parent
3bf4e9b877
commit
8b91febed7
2 changed files with 5 additions and 3 deletions
|
@ -142,9 +142,6 @@ mpris = { version = "2.0.1", optional = true }
|
||||||
# networkmanager
|
# networkmanager
|
||||||
futures-signals = { version = "0.3.33", optional = true }
|
futures-signals = { version = "0.3.33", optional = true }
|
||||||
|
|
||||||
# schema
|
|
||||||
schemars = { version = "0.8.21", optional = true }
|
|
||||||
|
|
||||||
# sys_info
|
# sys_info
|
||||||
sysinfo = { version = "0.29.11", optional = true }
|
sysinfo = { version = "0.29.11", optional = true }
|
||||||
|
|
||||||
|
@ -168,3 +165,6 @@ regex = { version = "1.10.4", default-features = false, features = [
|
||||||
"std",
|
"std",
|
||||||
], optional = true } # music, sys_info
|
], optional = true } # music, sys_info
|
||||||
zbus = { version = "3.15.2", default-features = false, features = ["tokio"], optional = true } # networkmanager, notifications, upower
|
zbus = { version = "3.15.2", default-features = false, features = ["tokio"], optional = true } # networkmanager, notifications, upower
|
||||||
|
|
||||||
|
# schema
|
||||||
|
schemars = { version = "0.8.21", optional = true }
|
||||||
|
|
|
@ -3,6 +3,7 @@ use futures_lite::StreamExt;
|
||||||
use futures_signals::signal::SignalExt;
|
use futures_signals::signal::SignalExt;
|
||||||
use gtk::prelude::ContainerExt;
|
use gtk::prelude::ContainerExt;
|
||||||
use gtk::{Box as GtkBox, Image, Orientation};
|
use gtk::{Box as GtkBox, Image, Orientation};
|
||||||
|
use schemars::JsonSchema;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use tokio::sync::mpsc::Receiver;
|
use tokio::sync::mpsc::Receiver;
|
||||||
|
|
||||||
|
@ -14,6 +15,7 @@ use crate::modules::{Module, ModuleInfo, ModuleParts, ModuleUpdateEvent, WidgetC
|
||||||
use crate::{glib_recv, module_impl, send_async, spawn};
|
use crate::{glib_recv, module_impl, send_async, spawn};
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Clone)]
|
#[derive(Debug, Deserialize, Clone)]
|
||||||
|
#[cfg_attr(feature = "schema", derive(JsonSchema))]
|
||||||
pub struct NetworkManagerModule {
|
pub struct NetworkManagerModule {
|
||||||
#[serde(default = "default_icon_size")]
|
#[serde(default = "default_icon_size")]
|
||||||
icon_size: i32,
|
icon_size: i32,
|
||||||
|
|
Loading…
Add table
Reference in a new issue