You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@MaxVerevkin any reason not to check to see if the active_port does contain "headphones" even if form_factor is set to a non headphone value?
diff --git a/src/blocks/sound.rs b/src/blocks/sound.rs
index e7d9bbe82..22c3303ad 100644
--- a/src/blocks/sound.rs+++ b/src/blocks/sound.rs@@ -156,13 +156,8 @@ pub async fn run(config: &Config, api: &CommonApi) -> Result<()> {
// form_factor's possible values are listed at:
// https://docs.rs/libpulse-binding/2.25.0/libpulse_binding/proplist/properties/constant.DEVICE_FORM_FACTOR.html
Some("headset") | Some("headphone") | Some("hands-free") | Some("portable") => true,
- // Per discussion at- // 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.to_lowercase().contains("headphones")),- // form_factor is present and is some non-headphone value- _ => false,+ // We should fall back to checking to see if the active_port contains "headphones".+ _ => active_port.is_some_and(|p| p.to_lowercase().contains("headphones")),
};
if headphones {
return "headphones";
Version:
I have the same problem as in #2047. I checked NEWS.md and it says
so I assume that pr is in 0.33.2. The version update didn't seem to fix it.
I'm using pipewire if that helps.
Reproduction config
Output (I changed the volume up and down a bit and also disconnected and reconnected my headphones):
The text was updated successfully, but these errors were encountered: