summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--conf/logind.conf54
-rw-r--r--sv/pipewire-pulse/conf12
-rwxr-xr-xsv/pipewire-pulse/log/run12
-rwxr-xr-xsv/pipewire-pulse/run12
-rw-r--r--sv/pipewire/conf12
-rwxr-xr-xsv/pipewire/log/run12
-rwxr-xr-xsv/pipewire/run9
-rw-r--r--sv/wireplumber/conf12
-rwxr-xr-xsv/wireplumber/log/run12
-rwxr-xr-xsv/wireplumber/run12
11 files changed, 161 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3420d58
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+runsvdir/
+supervise/
diff --git a/conf/logind.conf b/conf/logind.conf
new file mode 100644
index 0000000..c31f33a
--- /dev/null
+++ b/conf/logind.conf
@@ -0,0 +1,54 @@
+# This file is part of elogind.
+#
+# elogind is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# Entries in this file show the compile time defaults.
+# You can change settings by editing this file.
+# Defaults can be restored by simply deleting this file.
+#
+# See logind.conf(5) for details.
+
+[Login]
+KillUserProcesses=yes
+#KillOnlyUsers=
+#KillExcludeUsers=root
+#InhibitDelayMaxSec=5
+#HandlePowerKey=poweroff
+#HandleSuspendKey=suspend
+#HandleHibernateKey=hibernate
+#HandleLidSwitch=suspend
+#HandleLidSwitchExternalPower=suspend
+#HandleLidSwitchDocked=ignore
+#PowerKeyIgnoreInhibited=no
+#SuspendKeyIgnoreInhibited=no
+#HibernateKeyIgnoreInhibited=no
+#LidSwitchIgnoreInhibited=yes
+#HoldoffTimeoutSec=30s
+#IdleAction=ignore
+#IdleActionSec=30min
+#RuntimeDirectorySize=10%
+#RuntimeDirectoryInodes=400k
+#RemoveIPC=yes
+#InhibitorsMax=8192
+#SessionsMax=8192
+
+[Sleep]
+#AllowSuspend=yes
+#AllowHibernation=yes
+#AllowSuspendThenHibernate=yes
+#AllowHybridSleep=yes
+#AllowPowerOffInterrupts=no
+#BroadcastPowerOffInterrupts=yes
+#AllowSuspendInterrupts=no
+#BroadcastSuspendInterrupts=yes
+#HandleNvidiaSleep=no
+#SuspendState=mem standby freeze
+#SuspendMode=
+#HibernateState=disk
+#HibernateMode=platform shutdown
+#HybridSleepState=disk
+#HybridSleepMode=suspend platform shutdown
+#HibernateDelaySec=10800
diff --git a/sv/pipewire-pulse/conf b/sv/pipewire-pulse/conf
new file mode 100644
index 0000000..606eac5
--- /dev/null
+++ b/sv/pipewire-pulse/conf
@@ -0,0 +1,12 @@
+# -*- mode: sh; -*-
+
+# Additional command line arguments for pipewire-pulse.
+OPTS=''
+
+# Setting this to 1 enables logging, any other value - disables.
+LOGGING_ENABLE=0
+# Set the pipewire log level.
+# See: https://docs.pipewire.org/page_daemon.html#sec_logging
+LOG_LEVEL=1
+# The directory will be created for you, if logging is enabled.
+LOG_DIR="$HOME/.local/var/log/pipewire-pulse"
diff --git a/sv/pipewire-pulse/log/run b/sv/pipewire-pulse/log/run
new file mode 100755
index 0000000..ba8236e
--- /dev/null
+++ b/sv/pipewire-pulse/log/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+[ -r ../conf ] && . ../conf
+
+if [ "${LOGGING_ENABLE}x" = "1x" ]; then
+ # Create the log directory if not exists.
+ [ -d "${LOG_DIR}" ] || mkdir -p "${LOG_DIR}"
+
+ exec svlogd -tt "${LOG_DIR}"
+else
+ exec chpst -b pipewire-pulse-log-null cat >/dev/null
+fi
diff --git a/sv/pipewire-pulse/run b/sv/pipewire-pulse/run
new file mode 100755
index 0000000..015c092
--- /dev/null
+++ b/sv/pipewire-pulse/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# Wait for the PipeWire Media Session daemon to start.
+sv check "$HOME/.runit/sv/wireplumber" >/dev/null || exit 1
+
+[ -r ./conf ] && . ./conf
+
+if [ "${LOGGING_ENABLE}x" = "1x" -a -n "${LOG_LEVEL}" ]; then
+ export PIPEWIRE_DEBUG="${LOG_LEVEL}"
+fi
+
+exec pipewire-pulse ${OPTS:-} 2>&1
diff --git a/sv/pipewire/conf b/sv/pipewire/conf
new file mode 100644
index 0000000..5b61994
--- /dev/null
+++ b/sv/pipewire/conf
@@ -0,0 +1,12 @@
+# -*- mode: sh; -*-
+
+# Additional command line arguments for pipewire(1).
+OPTS=''
+
+# Setting this to 1 enables logging, any other value - disables.
+LOGGING_ENABLE=1
+# Set the pipewire log level.
+# See: https://docs.pipewire.org/page_daemon.html#sec_logging
+LOG_LEVEL=1
+# The directory will be created for you, if logging is enabled.
+LOG_DIR="$HOME/.local/var/log/pipewire"
diff --git a/sv/pipewire/log/run b/sv/pipewire/log/run
new file mode 100755
index 0000000..64fc800
--- /dev/null
+++ b/sv/pipewire/log/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+[ -r ../conf ] && . ../conf
+
+if [ "${LOGGING_ENABLE}x" = "1x" ]; then
+ # Create the log directory if not exists.
+ [ -d "${LOG_DIR}" ] || mkdir -p "${LOG_DIR}"
+
+ exec svlogd -tt "${LOG_DIR}"
+else
+ exec chpst -b pipewire-log-null cat >/dev/null
+fi
diff --git a/sv/pipewire/run b/sv/pipewire/run
new file mode 100755
index 0000000..c6cf2e0
--- /dev/null
+++ b/sv/pipewire/run
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+if [ "${LOGGING_ENABLE}x" = "1x" -a -n "${LOG_LEVEL}" ]; then
+ export PIPEWIRE_DEBUG="${LOG_LEVEL}"
+fi
+
+exec pipewire ${OPTS:-} 2>&1
diff --git a/sv/wireplumber/conf b/sv/wireplumber/conf
new file mode 100644
index 0000000..d712f03
--- /dev/null
+++ b/sv/wireplumber/conf
@@ -0,0 +1,12 @@
+# -*- mode: sh; -*-
+
+# Additional command line arguments for wireplumber.
+OPTS=''
+
+# Setting this to 1 enables logging, any other value - disables.
+LOGGING_ENABLE=0
+# Set the wireplumber log level.
+# See: https://pipewire.pages.freedesktop.org/wireplumber/daemon-logging.html
+LOG_LEVEL=2
+# The directory will be created for you, if logging is enabled.
+LOG_DIR="$HOME/.local/var/log/wireplumber"
diff --git a/sv/wireplumber/log/run b/sv/wireplumber/log/run
new file mode 100755
index 0000000..aa89d14
--- /dev/null
+++ b/sv/wireplumber/log/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+[ -r ../conf ] && . ../conf
+
+if [ "${LOGGING_ENABLE}x" == "1x" ]; then
+ # Create the log directory if not exists.
+ [ -d "${LOG_DIR}" ] || mkdir -p "${LOG_DIR}"
+
+ exec svlogd -tt "${LOG_DIR}"
+else
+ exec chpst -b wireplumber-log-null cat >/dev/null
+fi
diff --git a/sv/wireplumber/run b/sv/wireplumber/run
new file mode 100755
index 0000000..04ca9d3
--- /dev/null
+++ b/sv/wireplumber/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# Wait for the PipeWire daemon to start.
+sv check "$HOME/.runit/sv/pipewire" >/dev/null || exit 1
+
+[ -r ./conf ] && . ./conf
+
+if [ "${LOGGING_ENABLE}x" = "1x" -a -n "${LOG_LEVEL}" ]; then
+ export WIREPLUMBER_DEBUG="${LOG_LEVEL}"
+fi
+
+exec wireplumber ${OPTS:-} 2>&1