mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-02 11:11:04 +02:00
refactor: move most of the horrible add_module
macro content into proper functions
This commit is contained in:
parent
490f3f3f65
commit
2c1b2924d4
15 changed files with 317 additions and 344 deletions
|
@ -68,7 +68,7 @@ pub struct MpdModule {
|
|||
music_dir: PathBuf,
|
||||
|
||||
#[serde(flatten)]
|
||||
pub common: CommonConfig,
|
||||
pub common: Option<CommonConfig>,
|
||||
}
|
||||
|
||||
fn default_socket() -> String {
|
||||
|
@ -128,6 +128,10 @@ impl Module<Button> for MpdModule {
|
|||
type SendMessage = Option<SongUpdate>;
|
||||
type ReceiveMessage = PlayerCommand;
|
||||
|
||||
fn name() -> &'static str {
|
||||
"mpd"
|
||||
}
|
||||
|
||||
fn spawn_controller(
|
||||
&self,
|
||||
_info: &ModuleInfo,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue