Skip to content

Commit

Permalink
music: remove hide_when_empty
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxVerevkin committed Dec 7, 2022
1 parent a8e41aa commit 283cb76
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/blocks/music.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
//! `interface_name_exclude` | A list of regex patterns for player MPRIS interface names to ignore. | `[]`
//! `separator` | String to insert between artist and title. | `" - "`
//! `seek_step` | Number of microseconds to seek forward/backward when scrolling on the bar. | `1000`
//! `hide_when_empty` | Hides the block when there is no player available. | `false`
//!
//! Note: All placeholders can be absent. See the examples below to learn how to handle this.
//! Note: All placeholders exctpt `icon` can be absent. See the examples below to learn how to handle this.
//!
//! Placeholder | Value | Type
//! ------------|----------------|------
Expand Down Expand Up @@ -104,7 +103,6 @@ pub struct Config {
separator: String,
#[default(1_000)]
seek_step: i64,
hide_when_empty: bool,
}

#[derive(Deserialize, Debug, Clone, SmartDefault)]
Expand Down Expand Up @@ -233,9 +231,6 @@ pub async fn run(config: Config, mut api: CommonApi) -> Result<()> {
widget.state = state;
api.set_widget(&widget).await?;
}
None if config.hide_when_empty => {
api.hide().await?;
}
None => {
widget.set_values(map!("icon" => Value::icon(api.get_icon("music")?)));
widget.state = State::Idle;
Expand Down

0 comments on commit 283cb76

Please sign in to comment.