Skip to content

Commit

Permalink
sound: ignore case when comparing active_port to headphones
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxVerevkin committed Apr 26, 2024
1 parent 16a530e commit 44c7aaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/blocks/sound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ pub async fn run(config: &Config, api: &CommonApi) -> Result<()> {
// https://github.com/greshake/i3status-rust/pull/1363#issuecomment-1046095869,
// some sinks may not have the form_factor property, so we should fall back to the
// active_port if that property is not present.
None => active_port.is_some_and(|p| p.contains("headphones")),
None => active_port.is_some_and(|p| p.to_lowercase().contains("headphones")),
// form_factor is present and is some non-headphone value
_ => false,
};
Expand Down

0 comments on commit 44c7aaf

Please sign in to comment.