summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.bin/sync-public-dotfiles1
-rwxr-xr-x.config/pipewire/pipewire-pulse.conf37
-rwxr-xr-x.config/pipewire/pipewire-pulse.sh21
3 files changed, 59 insertions, 0 deletions
diff --git a/.bin/sync-public-dotfiles b/.bin/sync-public-dotfiles
index 7bff64f..5a6e795 100755
--- a/.bin/sync-public-dotfiles
+++ b/.bin/sync-public-dotfiles
@@ -19,6 +19,7 @@ allowed_patterns="-e ^.bin
-e ^.config/nvim/
-e ^.config/qutebrowser/config.py
-e ^.config/qutebrowser/greasemonkey/
+ -e ^.config/pipewire/
-e ^.config/sway/config
-e ^.config/systemd/*.service
-e ^.config/user-dirs.dir
diff --git a/.config/pipewire/pipewire-pulse.conf b/.config/pipewire/pipewire-pulse.conf
new file mode 100755
index 0000000..a8f7dd3
--- /dev/null
+++ b/.config/pipewire/pipewire-pulse.conf
@@ -0,0 +1,37 @@
+context.properties = {
+}
+
+context.spa-libs = {
+ audio.convert.* = audioconvert/libspa-audioconvert
+ support.* = support/libspa-support
+}
+
+context.modules = [
+ { name = libpipewire-module-rtkit
+ args = {
+ }
+ flags = [ ifexists nofail ]
+ }
+ { name = libpipewire-module-protocol-native }
+ { name = libpipewire-module-client-node }
+ { name = libpipewire-module-adapter }
+ { name = libpipewire-module-metadata }
+
+ { name = libpipewire-module-protocol-pulse
+ args = {
+ server.address = [
+ "unix:native"
+ ]
+ vm.overrides = {
+ pulse.min.quantum = 1024/48000 # 22ms
+ }
+ }
+ }
+]
+
+stream.properties = {
+}
+
+context.exec = [
+ { path = "/bin/sh" args = "/home/qwd/.config/pipewire/pipewire-pulse.sh" }
+]
diff --git a/.config/pipewire/pipewire-pulse.sh b/.config/pipewire/pipewire-pulse.sh
new file mode 100755
index 0000000..aff3a23
--- /dev/null
+++ b/.config/pipewire/pipewire-pulse.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+sleep 3
+
+source_name="master-mono"
+
+source_index=$(pactl list short sources |
+ grep "input.*pci-" |
+ head -n 1 |
+ awk '{print $1;}')
+
+echo "${source_index}"
+
+pactl load-module module-remap-source \
+ "source_name=${source_name}" \
+ "master=${source_index}" \
+ channels=1 \
+ master_channel_map=front-left \
+ channel_map=mono
+
+pactl set-default-source "${source_name}"
remember that computers suck.