From 31ec37cd3becea737b6f8a37b274b0b3a83bd205 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Fri, 9 Jul 2021 12:41:01 +0200 Subject: [PATCH] add timer to force pulseaudio to use 100% volume for sink inputs --- .config/systemd/user/pulseaudio-assert-volume.service | 5 +++++ .config/systemd/user/pulseaudio-assert-volume.timer | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 .config/systemd/user/pulseaudio-assert-volume.service create mode 100644 .config/systemd/user/pulseaudio-assert-volume.timer diff --git a/.config/systemd/user/pulseaudio-assert-volume.service b/.config/systemd/user/pulseaudio-assert-volume.service new file mode 100644 index 0000000..fcde58b --- /dev/null +++ b/.config/systemd/user/pulseaudio-assert-volume.service @@ -0,0 +1,5 @@ +[Unit] +Description=pulseaudio sickofit + +[Service] +ExecStart=/usr/bin/bash -c "pactl list sink-inputs | grep -F 'Sink Input #' | cut -d# -f2 | while read id; do pactl set-sink-input-volume $id 100%; done" diff --git a/.config/systemd/user/pulseaudio-assert-volume.timer b/.config/systemd/user/pulseaudio-assert-volume.timer new file mode 100644 index 0000000..7bc5ffc --- /dev/null +++ b/.config/systemd/user/pulseaudio-assert-volume.timer @@ -0,0 +1,11 @@ +[Unit] +Description=pulseaudio sickofit + +[Timer] +Persistent=False +OnUnitActiveSec=1s +OnUnitInctiveSec=1s +AccuracySec=1ms + +[Install] +WantedBy=timers.target