Lines 9-14
Link Here
|
9 |
# which means D-Bus session instance is expected to be correctly set up |
9 |
# which means D-Bus session instance is expected to be correctly set up |
10 |
# prior to this script starting. If that is not true, things may break! |
10 |
# prior to this script starting. If that is not true, things may break! |
11 |
|
11 |
|
|
|
12 |
DATE_FORMAT='+%Y-%m-%dT%H:%M:%S%Z' |
13 |
|
14 |
CONF="${XDG_CONFIG_HOME}/gentoo-pipewire-launcher.conf" |
15 |
if [ -f "${CONF}" ] |
16 |
then |
17 |
. "${CONF}" |
18 |
else |
19 |
GENTOO_PIPEWIRE_LOG='/dev/null' |
20 |
GENTOO_PIPEWIRE_PULSE_LOG='/dev/null' |
21 |
GENTOO_WIREPLUMBER_LOG='/dev/null' |
22 |
fi |
23 |
for L in \ |
24 |
"${GENTOO_PIPEWIRE_LOG}" \ |
25 |
"${GENTOO_PIPEWIRE_PULSE_LOG}" \ |
26 |
"${GENTOO_WIREPLUMBER_LOG}" |
27 |
do |
28 |
if [ ! -e "${L}" ] |
29 |
then |
30 |
touch "${L}" |
31 |
fi |
32 |
done |
33 |
|
12 |
restart () { |
34 |
restart () { |
13 |
echo "Terminating PipeWire processes ..." |
35 |
echo "Terminating PipeWire processes ..." |
14 |
pkill -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1 |
36 |
pkill -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1 |
Lines 36-52
then
Link Here
|
36 |
fi |
58 |
fi |
37 |
|
59 |
|
38 |
# The core daemon which by itself does probably nothing. |
60 |
# The core daemon which by itself does probably nothing. |
39 |
@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire & |
61 |
echo "[$(@GENTOO_PORTAGE_EPREFIX@/bin/date ${DATE_FORMAT})] Starting PipeWire." 1>>"${GENTOO_PIPEWIRE_LOG}" |
|
|
62 |
@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire 1>>"${GENTOO_PIPEWIRE_LOG}" 2>&1 & |
40 |
|
63 |
|
41 |
# The so called pipewire-pulse daemon used for PulseAudio compatibility. |
64 |
# The so called pipewire-pulse daemon used for PulseAudio compatibility. |
42 |
# Commenting this out will stop the PA proxying daemon from starting, |
65 |
# Commenting this out will stop the PA proxying daemon from starting, |
43 |
# however ALSA (with pipewire-alsa), JACK (with jack-sdk) and PW API using |
66 |
# however ALSA (with pipewire-alsa), JACK (with jack-sdk) and PW API using |
44 |
# clients will still have access to audio and may end up clashing with |
67 |
# clients will still have access to audio and may end up clashing with |
45 |
# non-PW apps over HW control (most notably, /usr/bin/pulseaudio daemon). |
68 |
# non-PW apps over HW control (most notably, /usr/bin/pulseaudio daemon). |
46 |
@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire -c pipewire-pulse.conf & |
69 |
echo "[$(@GENTOO_PORTAGE_EPREFIX@/bin/date ${DATE_FORMAT})] Starting PipeWire-Pulse." 1>>"${GENTOO_PIPEWIRE_PULSE_LOG}" |
|
|
70 |
@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire -c pipewire-pulse.conf 1>>"${GENTOO_PIPEWIRE_PULSE_LOG}" 2>&1 & |
47 |
|
71 |
|
48 |
# Hack for bug #822498 |
72 |
# Hack for bug #822498 |
49 |
sleep 1 |
73 |
sleep 1 |
50 |
|
74 |
|
51 |
# Finally a session manager is required for PipeWire to do anything. |
75 |
# Finally a session manager is required for PipeWire to do anything. |
52 |
exec @GENTOO_PORTAGE_EPREFIX@/usr/bin/wireplumber |
76 |
echo "[$(@GENTOO_PORTAGE_EPREFIX@/bin/date ${DATE_FORMAT})] Starting WirePlumber." 1>>"${GENTOO_WIREPLUMBER_LOG}" |
|
|
77 |
exec @GENTOO_PORTAGE_EPREFIX@/usr/bin/wireplumber 1>>"${GENTOO_WIREPLUMBER_LOG}" 2>&1 |
53 |
- |
|
|