diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2022-01-03 15:27:09 +0100 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2022-01-03 15:27:09 +0100 |
commit | 21f8635c982d4d86e88fcad8e7b94b087641fb11 (patch) | |
tree | 6caf7b9e9bbdf7b131b6af7f14f5fdd13a4065bb | |
parent | a3d041d259756dc609b40e5244965fb36b05b8a3 (diff) | |
download | dots-21f8635c982d4d86e88fcad8e7b94b087641fb11.tar.gz |
Mon Jan 3 03:27:09 PM CET 2022
-rwxr-xr-x | .bin/sync-public-dotfiles | 1 | ||||
-rwxr-xr-x | .config/pipewire/pipewire-pulse.conf | 37 | ||||
-rwxr-xr-x | .config/pipewire/pipewire-pulse.sh | 21 |
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}" |