ErikReider/SwayOSD

Unknown option --max-volume

sopyb opened this issue · 3 comments

sopyb commented

When trying to run the server with swayosd-server --max-volume=150 or wayosd-server --max-volume 150 I get that --max-volume is not a CLI option

Am I doing something wrong here?

sopyb commented

And it's a client option not a server option so the readme is wrong or the implementation is wrong

I think it is supposed to be a server option because within the src/server/application.rs there are match statements for ArgTypes::MaxVolume.

However there isn't anything that is setting max-volume as an option within new, there is only:

		app.add_main_option(
			"top-margin",
			glib::Char::from(0),
			OptionFlags::NONE,
			OptionArg::String,
			&format!(
				"OSD margin from top edge (0.5 would be screen center). Default is {}",
				*utils::TOP_MARGIN_DEFAULT
			),
			Some("from 0.0 to 1.0"),
		);

I copied the code from src/client/main.rs that adds max-volume as an option into new, and the error about --max-volume not being a cli option disappears, but I'm not sure if that is a good fix or not.

I removed the server max-volume and moved it into the client. I'll fix the README