File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -160,11 +160,11 @@ pub async fn run(config: &Config, api: &CommonApi) -> Result<()> {
160160 Some ( "headset" ) | Some ( "headphone" ) | Some ( "hands-free" ) | Some ( "portable" ) => true ,
161161 // Per discussion at
162162 // https://github.com/greshake/i3status-rust/pull/1363#issuecomment-1046095869,
163- // some sinks may not have the form_factor property, so we should fall back to the
164- // active_port if that property is not present .
165- None => active_port. is_some_and ( |p| p . to_lowercase ( ) . contains ( "headphones" ) ) ,
166- // form_factor is present and is some non-headphone value
167- _ => false ,
163+ // fall back to checking active_port if form_factor is absent, unknown, or doesn't match
164+ // known headphone values (common on PipeWire/WirePlumber systems) .
165+ _ => active_port
166+ . as_ref ( )
167+ . is_some_and ( |p| p . to_lowercase ( ) . contains ( "headphone" ) ) ,
168168 } ;
169169 if headphones {
170170 return "headphones" ;
You can’t perform that action at this time.
0 commit comments