steamosctl: Add reload-config command

This commit is contained in:
Vicki Pfau 2025-02-05 18:08:02 -08:00
parent 406704ab6b
commit cb112711b3

View file

@ -184,6 +184,9 @@ enum Commands {
/// Get the recommended minimum for a charge level limit /// Get the recommended minimum for a charge level limit
SuggestedMinimumChargeLimit, SuggestedMinimumChargeLimit,
/// Reload the configuration from disk
ReloadConfig,
} }
async fn get_all_properties(conn: &Connection) -> Result<()> { async fn get_all_properties(conn: &Connection) -> Result<()> {
@ -463,6 +466,10 @@ async fn main() -> Result<()> {
let limit = proxy.suggested_minimum_limit().await?; let limit = proxy.suggested_minimum_limit().await?;
println!("Suggested minimum charge limit: {limit}"); println!("Suggested minimum charge limit: {limit}");
} }
Commands::ReloadConfig => {
let proxy = Manager2Proxy::new(&conn).await?;
proxy.reload_config().await?;
}
} }
Ok(()) Ok(())