[][src]Struct i3status_rs::blocks::music::MusicConfig

pub struct MusicConfig {
    pub player: Option<String>,
    pub max_width: usize,
    pub dynamic_width: bool,
    pub marquee: bool,
    pub marquee_interval: Duration,
    pub marquee_speed: Duration,
    pub smart_trim: bool,
    pub separator: String,
    pub buttons: Vec<String>,
    pub on_collapsed_click: Option<String>,
    pub seek_step: i64,
    pub interface_name_exclude: Vec<String>,
    pub hide_when_empty: bool,
    pub format: String,
}

Fields

player: Option<String>

Name of the music player. Must be the same name the player is registered with the MediaPlayer2 Interface. If not specified then the block will track all players found.

max_width: usize

Max width of the block in characters, not including the buttons.

dynamic_width: bool

Bool to specify whether the block will change width depending on the text content or remain static always (= max_width)

marquee: bool

Bool to specify if a marquee style rotation should be used if the title + artist is longer than max-width

marquee_interval: Duration

Marquee interval in seconds. This is the delay between each rotation.

marquee_speed: Duration

Marquee speed in seconds. This is the scrolling time used per character.

smart_trim: bool

Bool to specify whether smart trimming should be used when marquee rotation is disabled and the title + artist is longer than max-width. It will trim from both the artist and the title in proportion to their lengths, to try and show the most information possible.

separator: String

Separator to use between artist and title.

buttons: Vec<String>

Array of control buttons to be displayed. Options are prev (previous title), play (play/pause) and next (next title).

on_collapsed_click: Option<String>seek_step: i64interface_name_exclude: Vec<String>

MPRIS interface name regex patterns to ignore.

hide_when_empty: boolformat: String

Format string for displaying music player info.

Trait Implementations

impl Clone for MusicConfig[src]

impl Debug for MusicConfig[src]

impl Default for MusicConfig[src]

impl<'de> Deserialize<'de> for MusicConfig where
    MusicConfig: Default
[src]

Auto Trait Implementations

impl RefUnwindSafe for MusicConfig[src]

impl Send for MusicConfig[src]

impl Sync for MusicConfig[src]

impl Unpin for MusicConfig[src]

impl UnwindSafe for MusicConfig[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.