From f030971d6d48245cc3983fb7c525a434ecf6c1d4 Mon Sep 17 00:00:00 2001 From: histalek Date: Wed, 9 Oct 2024 22:45:11 +0200 Subject: [PATCH] feat(pipewire): Move from lua configs to conf files --- .../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 ---- .../51-disable-devices.conf | 62 +++++++++++++++++++ .../wireplumber.conf.d/51-rename-devices.conf | 26 ++++++++ 5 files changed, 88 insertions(+), 39 deletions(-) delete mode 100644 .config/wireplumber/main.lua.d/51-disable-amd-audio.lua delete mode 100644 .config/wireplumber/main.lua.d/51-disable-headphone-jack.lua delete mode 100644 .config/wireplumber/main.lua.d/51-disable-headset-mic.lua create mode 100644 .config/wireplumber/wireplumber.conf.d/51-disable-devices.conf create mode 100644 .config/wireplumber/wireplumber.conf.d/51-rename-devices.conf diff --git a/.config/wireplumber/main.lua.d/51-disable-amd-audio.lua b/.config/wireplumber/main.lua.d/51-disable-amd-audio.lua deleted file mode 100644 index f022210..0000000 --- a/.config/wireplumber/main.lua.d/51-disable-amd-audio.lua +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 9ad7f50..0000000 --- a/.config/wireplumber/main.lua.d/51-disable-headphone-jack.lua +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 3d4ef62..0000000 --- a/.config/wireplumber/main.lua.d/51-disable-headset-mic.lua +++ /dev/null @@ -1,12 +0,0 @@ -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) diff --git a/.config/wireplumber/wireplumber.conf.d/51-disable-devices.conf b/.config/wireplumber/wireplumber.conf.d/51-disable-devices.conf new file mode 100644 index 0000000..c6ba02d --- /dev/null +++ b/.config/wireplumber/wireplumber.conf.d/51-disable-devices.conf @@ -0,0 +1,62 @@ +monitor.alsa.rules = [ + { + matches = [ + { + device.name = "alsa_card.pci-0000_08_00.1" + } + ] + actions = { + update-props = { + device.disabled = true + } + } + }, + { + matches = [ + { + device.name = "alsa_card.pci-0000_0a_00.1" + } + ] + actions = { + update-props = { + device.disabled = true + } + } + }, + { + matches = [ + { + device.name = "alsa_card.pci-0000_0a_00.4" + } + ] + actions = { + update-props = { + device.disabled = true + } + } + }, + { + matches = [ + { + device.name = "alsa_card.pci-0000_0c_00.4" + } + ] + actions = { + update-props = { + device.disabled = true + } + } + }, + { + matches = [ + { + node.name = "alsa_input.usb-SteelSeries_SteelSeries_Arctis_7-00.mono-chat" + } + ] + actions = { + update-props = { + node.disabled = true + } + } + } +] diff --git a/.config/wireplumber/wireplumber.conf.d/51-rename-devices.conf b/.config/wireplumber/wireplumber.conf.d/51-rename-devices.conf new file mode 100644 index 0000000..93456fb --- /dev/null +++ b/.config/wireplumber/wireplumber.conf.d/51-rename-devices.conf @@ -0,0 +1,26 @@ +monitor.alsa.rules = [ + { + matches = [ + { + node.name = "alsa_output.usb-SteelSeries_SteelSeries_Arctis_7-00.stereo-game" + } + ] + actions = { + update-props = { + node.description = "Headset (Game)" + } + } + }, + { + matches = [ + { + node.name = "alsa_output.usb-SteelSeries_SteelSeries_Arctis_7-00.mono-chat" + } + ] + actions = { + update-props = { + node.description = "Headset (Chat)" + } + } + } +]