diff options
| -rw-r--r-- | mumctl/src/main.rs | 4 | ||||
| -rw-r--r-- | mumd/src/state.rs | 4 | ||||
| -rw-r--r-- | mumlib/src/command.rs | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/mumctl/src/main.rs b/mumctl/src/main.rs index 44c5d26..e55796b 100644 --- a/mumctl/src/main.rs +++ b/mumctl/src/main.rs @@ -78,6 +78,8 @@ fn main() { SubCommand::with_name("config") .arg(Arg::with_name("name").required(true)) .arg(Arg::with_name("value").required(true))) + .subcommand( + SubCommand::with_name("config-reload")) .subcommand(SubCommand::with_name("completions") .arg(Arg::with_name("zsh") .long("zsh")) @@ -256,6 +258,8 @@ fn main() { println!("{} Unknown config value {}", "error:".red(), name); } } + } else if matches.subcommand_matches("config-reload").is_some() { + send_command(Command::ConfigReload).unwrap(); } else if let Some(matches) = matches.subcommand_matches("completions") { app.gen_completions_to( "mumctl", diff --git a/mumd/src/state.rs b/mumd/src/state.rs index e436d3d..08724dd 100644 --- a/mumd/src/state.rs +++ b/mumd/src/state.rs @@ -171,6 +171,10 @@ impl State { self.audio.set_input_volume(volume); (false, Ok(None)) } + Command::ConfigReload => { + self.reload_config(); + (false, Ok(None)) + } } } diff --git a/mumlib/src/command.rs b/mumlib/src/command.rs index b4ab07a..05702f0 100644 --- a/mumlib/src/command.rs +++ b/mumlib/src/command.rs @@ -8,6 +8,7 @@ pub enum Command { channel_identifier: String, }, ChannelList, + ConfigReload, InputVolumeSet(f32), ServerConnect { host: String, |
