2023-01-24 15:10:27 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-06-17 00:03:57 -04:00
|
|
|
START_TIME=`date +"%b %d, %Y %T"`
|
|
|
|
LOG_FILE_WIRE="${XDG_STATE_HOME}"/wireplumber.log
|
|
|
|
LOG_FILE_PIPE="${XDG_STATE_HOME}"/pipewire.log
|
|
|
|
LOG_FILE_PULSE="${XDG_STATE_HOME}"/pipewire-pulse.log
|
|
|
|
|
|
|
|
echo "--- ${START_TIME} ---" > "$LOG_FILE_WIRE"
|
|
|
|
echo "--- ${START_TIME} ---" > "$LOG_FILE_PIPE"
|
|
|
|
echo "--- ${START_TIME} ---" > "$LOG_FILE_PULSE"
|
|
|
|
|
2023-01-24 15:10:27 -05:00
|
|
|
# Kill any running pipewire processes
|
|
|
|
killall -q wireplumber & killall -q pipewire-pulse & killall -q pipewire
|
|
|
|
|
|
|
|
# Wait for processes to stop
|
|
|
|
while pgrep -u $UID -x wireplumber >/dev/null; do sleep 1; done
|
|
|
|
while pgrep -u $UID -x pipewire >/dev/null; do sleep 1; done
|
|
|
|
while pgrep -u $UID -x pipewire-pulse >/dev/null; do sleep 1; done
|
|
|
|
|
2023-04-12 00:35:32 -04:00
|
|
|
# Wait for xdg-desktop-portal to start
|
|
|
|
until pgrep -u $UID -f /usr/lib/xdg-desktop-portal >/dev/null; do sleep 1; done
|
|
|
|
|
2023-01-24 15:10:27 -05:00
|
|
|
# Launch pipewire
|
2023-06-17 00:03:57 -04:00
|
|
|
/usr/bin/wireplumber 2>&1 | tee -a "$LOG_FILE_WIRE" & disown
|
|
|
|
/usr/bin/pipewire 2>&1 | tee -a "$LOG_FILE_PIPE" & disown
|
|
|
|
/usr/bin/pipewire-pulse 2>&1 | tee -a "$LOG_FILE_PULSE" & disown
|
2023-01-24 15:10:27 -05:00
|
|
|
|