-
Notifications
You must be signed in to change notification settings - Fork 2
/
pipewire
33 lines (28 loc) · 904 Bytes
/
pipewire
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/openrc-run
# Work based on file by "Gentoo Authors", 2022
# Modified for Artix Linux by dreieck, 2023
# Modified for Artix Linux by Daniel Chan, 2024
# Distributed under the terms of the GNU General Public License v2
USER="`id -nu ${RC_RUNLEVEL}`"
PIPEWIRE_RUNTIME_DIR="/run/user/${RC_RUNLEVEL}"
name="pipewire daemon"
description="A sound server which speaks pipewire, pulseaudio and jack."
command=/usr/bin/pipewire
command_args="${pipewire_args[@]}"
command_background=yes
command_user="${USER}:${USER}"
pidfile="${PIPEWIRE_RUNTIME_DIR}/pipewire.pid"
depend() {
after udev dbus
use alsasound pulseaudio
}
start_pre() {
export PIPEWIRE_RUNTIME_DIR
export USER
}
start_post() {
einfo "Wait for the pipewire socket to be ready ..."
sleep 3
find "${PIPEWIRE_RUNTIME_DIR}" -type s -exec chmod g+w '{}' ';'
einfo "Socket file(s): $(find "${PIPEWIRE_RUNTIME_DIR}" -type s)"
}