mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-02 03:01:04 +02:00
docs: add some rustdoc comments throughout
This commit is contained in:
parent
5d319e91f2
commit
78e30b39fe
16 changed files with 84 additions and 2 deletions
|
@ -10,13 +10,17 @@ use tokio::task::spawn_blocking;
|
|||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub struct FocusedModule {
|
||||
/// Whether to show icon on the bar.
|
||||
#[serde(default = "crate::config::default_true")]
|
||||
show_icon: bool,
|
||||
/// Whether to show app name on the bar.
|
||||
#[serde(default = "crate::config::default_true")]
|
||||
show_title: bool,
|
||||
|
||||
/// Icon size in pixels.
|
||||
#[serde(default = "default_icon_size")]
|
||||
icon_size: i32,
|
||||
/// GTK icon theme to use.
|
||||
icon_theme: Option<String>,
|
||||
}
|
||||
|
||||
|
|
|
@ -17,12 +17,17 @@ use tokio::task::spawn_blocking;
|
|||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub struct LauncherModule {
|
||||
/// List of app IDs (or classes) to always show regardles of open state,
|
||||
/// in the order specified.
|
||||
favorites: Option<Vec<String>>,
|
||||
/// Whether to show application names on the bar.
|
||||
#[serde(default = "crate::config::default_false")]
|
||||
show_names: bool,
|
||||
/// Whether to show application icons on the bar.
|
||||
#[serde(default = "crate::config::default_true")]
|
||||
show_icons: bool,
|
||||
|
||||
/// Name of the GTK icon theme to use.
|
||||
icon_theme: Option<String>,
|
||||
}
|
||||
|
||||
|
|
|
@ -23,15 +23,20 @@ use tracing::error;
|
|||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub struct MpdModule {
|
||||
/// TCP or Unix socket address.
|
||||
#[serde(default = "default_socket")]
|
||||
host: String,
|
||||
/// Format of current song info to display on the bar.
|
||||
#[serde(default = "default_format")]
|
||||
format: String,
|
||||
/// Icon to display when playing.
|
||||
#[serde(default = "default_icon_play")]
|
||||
icon_play: Option<String>,
|
||||
/// Icon to display when paused.
|
||||
#[serde(default = "default_icon_pause")]
|
||||
icon_pause: Option<String>,
|
||||
|
||||
/// Path to root of music directory.
|
||||
#[serde(default = "default_music_dir")]
|
||||
music_dir: PathBuf,
|
||||
}
|
||||
|
|
|
@ -10,7 +10,9 @@ use tracing::{error, instrument};
|
|||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub struct ScriptModule {
|
||||
/// Path to script to execute.
|
||||
path: String,
|
||||
/// Time in milliseconds between executions.
|
||||
#[serde(default = "default_interval")]
|
||||
interval: u64,
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ use tokio::time::sleep;
|
|||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub struct SysInfoModule {
|
||||
/// List of formatting strings.
|
||||
format: Vec<String>,
|
||||
}
|
||||
|
||||
|
|
|
@ -13,8 +13,10 @@ use tracing::{debug, trace};
|
|||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub struct WorkspacesModule {
|
||||
/// Map of actual workspace names to custom names.
|
||||
name_map: Option<HashMap<String, String>>,
|
||||
|
||||
/// Whether to display icons for all monitors.
|
||||
#[serde(default = "crate::config::default_false")]
|
||||
all_monitors: bool,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue