Skip to content

Commit

Permalink
[common] Look a file only
Browse files Browse the repository at this point in the history
  • Loading branch information
goldyfruit committed Nov 21, 2023
1 parent cabc3c1 commit 8129922
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions utils/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ function detect_sound() {
SOUND_SERVER="PulseAudio (on PipeWire)"
fi
export SOUND_SERVER
elif [ -f "$PULSE_SOCKET_WSL2" ]; then
# This condition is only related to WSL2 as PulseServer socket will be under
# /mnt/wslg/ directory.
elif [ -s "$PULSE_SOCKET_WSL2" ]; then
# This condition is only related to WSL2 as PulseServer socket will be
# created under the /mnt/wslg/ directory.
if command -v pactl &>>"$LOG_FILE"; then
SOUND_SERVER="$(pactl info | awk -F":" '$1 ~ /Server Name/ { print $2 }' | sed 's/^ *//')"\
SOUND_SERVER="$(pactl info | awk -F":" '$1 ~ /Server Name/ { print $2 }' | sed 's/^ *//')"
export SOUND_SERVER
fi
# Looking for strictly for pipepire process
Expand Down

0 comments on commit 8129922

Please sign in to comment.