diff --git a/modules/hardware/sound.nix b/modules/hardware/sound.nix index f9c24da..55a68ff 100644 --- a/modules/hardware/sound.nix +++ b/modules/hardware/sound.nix @@ -57,8 +57,7 @@ in { HEAD="${pkgs.coreutils}/bin/head" $NOISETORCH -i -t ${toString cfg.noisetorch-threshold}; - sleep 2 - FILTER_ID=$($WPCTL status | $GREP "NoiseTorch" | $AWK '{print $2}' | $HEAD -c-2) + FILTER_ID=$($WPCTL status | $GREP NoiseTorch | $AWK 'match($0, /[0-9]+(\.[0-9]+)?/) { print substr($0, RSTART, RLENGTH) }' | head -n1) if [ -n "$FILTER_ID" ]; then $WPCTL set-default $FILTER_ID else