From d9e471ba03707586eb6dfcf62eaf41bf4b486095 Mon Sep 17 00:00:00 2001 From: histalek Date: Sun, 21 Aug 2022 20:56:22 +0200 Subject: [PATCH] pipewire: Configure wireplumber --- .config/sway/conf.d/keybinds | 12 ++++++------ .../main.lua.d/51-disable-amd-audio.lua | 15 +++++++++++++++ .../main.lua.d/51-disable-headphone-jack.lua | 12 ++++++++++++ .../main.lua.d/51-disable-headset-mic.lua | 12 ++++++++++++ 4 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 .config/wireplumber/main.lua.d/51-disable-amd-audio.lua create mode 100644 .config/wireplumber/main.lua.d/51-disable-headphone-jack.lua create mode 100644 .config/wireplumber/main.lua.d/51-disable-headset-mic.lua diff --git a/.config/sway/conf.d/keybinds b/.config/sway/conf.d/keybinds index e62e2ff..16373c4 100644 --- a/.config/sway/conf.d/keybinds +++ b/.config/sway/conf.d/keybinds @@ -176,11 +176,11 @@ bindsym $mod+r mode "resize" ## Mediakeys keybinds -bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +3% -bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -3% -bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle +bindsym --locked XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ +5% +bindsym --locked XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ -5% +bindsym --locked XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle -bindsym --locked $mod+XF86AudioRaiseVolume exec pactl set-source-volume @DEFAULT_SOURCE@ +3% -bindsym --locked $mod+XF86AudioLowerVolume exec pactl set-source-volume @DEFAULT_SOURCE@ -3% -bindsym --locked $mod+XF86AudioMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle +bindsym --locked $mod+XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SOURCE@ +5% +bindsym --locked $mod+XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SOURCE@ -5% +bindsym --locked $mod+XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle diff --git a/.config/wireplumber/main.lua.d/51-disable-amd-audio.lua b/.config/wireplumber/main.lua.d/51-disable-amd-audio.lua new file mode 100644 index 0000000..f022210 --- /dev/null +++ b/.config/wireplumber/main.lua.d/51-disable-amd-audio.lua @@ -0,0 +1,15 @@ +rule = { + matches = { + { + { "device.name", "equals", "alsa_card.pci-0000_0a_00.1" }, + }, + { + { "device.name", "equals", "alsa_card.pci-0000_06_00.1" }, + }, + }, + apply_properties = { + ["device.disabled"] = true, + }, +} + +table.insert(alsa_monitor.rules, rule) diff --git a/.config/wireplumber/main.lua.d/51-disable-headphone-jack.lua b/.config/wireplumber/main.lua.d/51-disable-headphone-jack.lua new file mode 100644 index 0000000..9ad7f50 --- /dev/null +++ b/.config/wireplumber/main.lua.d/51-disable-headphone-jack.lua @@ -0,0 +1,12 @@ +rule = { + matches = { + { + { "device.name", "equals", "alsa_card.pci-0000_0c_00.4" }, + }, + }, + apply_properties = { + ["device.disabled"] = true, + }, +} + +table.insert(alsa_monitor.rules, rule) diff --git a/.config/wireplumber/main.lua.d/51-disable-headset-mic.lua b/.config/wireplumber/main.lua.d/51-disable-headset-mic.lua new file mode 100644 index 0000000..3d4ef62 --- /dev/null +++ b/.config/wireplumber/main.lua.d/51-disable-headset-mic.lua @@ -0,0 +1,12 @@ +rule = { + matches = { + { + { "node.name", "equals", "alsa_input.usb-SteelSeries_SteelSeries_Arctis_7-00.mono-chat" }, + }, + }, + apply_properties = { + ["node.disabled"] = true, + }, +} + +table.insert(alsa_monitor.rules, rule)