From d641eadf7530b2425ff98cc8af6da0419c888252 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Wed, 19 Nov 2025 08:28:51 -0500 Subject: [PATCH] Audio: added a settings to choose your favorite external audio mixer (ex: pavucontrol, ...) --- Assets/Translations/de.json | 5 +++++ Assets/Translations/en.json | 5 +++++ Assets/Translations/es.json | 5 +++++ Assets/Translations/fr.json | 5 +++++ Assets/Translations/nl.json | 5 +++++ Assets/Translations/pt.json | 5 +++++ Assets/Translations/ru.json | 5 +++++ Assets/Translations/tr.json | 5 +++++ Assets/Translations/uk-UA.json | 5 +++++ Assets/Translations/zh-CN.json | 5 +++++ Commons/Settings.qml | 1 + Modules/Bar/Widgets/Microphone.qml | 2 +- Modules/Bar/Widgets/Volume.qml | 2 +- Modules/Panels/Settings/Tabs/AudioTab.qml | 19 ++++++++++++++----- 14 files changed, 67 insertions(+), 7 deletions(-) diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index 9516d8b6..79d7f5c3 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -743,6 +743,11 @@ "label": "Audio-Geräte" } }, + "external-mixer": { + "description": "Geben Sie den Befehl oder den Anwendungspfad ein, der beim Aktivieren der externen Audiomixer-Funktion gestartet werden soll.", + "label": "Externer Audio-Mixer-Befehl", + "placeholder": "pwvucontrol || pavucontrol" + }, "media": { "excluded-player": { "description": "Stichwörter für Player hinzufügen, die das System ignorieren soll. Jedes Stichwort sollte in einer neuen Zeile stehen.", diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 7aa43808..5247b799 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -743,6 +743,11 @@ "label": "Audio devices" } }, + "external-mixer": { + "description": "Enter the command or application path to launch when activating the external audio mixer feature.", + "label": "External Audio Mixer Command", + "placeholder": "pwvucontrol || pavucontrol" + }, "media": { "excluded-player": { "description": "Add keywords for players you want the system to ignore. Each keyword should be on a new line.", diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index 8c0c1ff5..b4aa3ebf 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -743,6 +743,11 @@ "label": "Dispositivos de audio" } }, + "external-mixer": { + "description": "Ingrese el comando o la ruta de la aplicación para ejecutar al activar la función de mezclador de audio externo.", + "label": "Comando de mezclador de audio externo", + "placeholder": "pwvucontrol || pavucontrol" + }, "media": { "excluded-player": { "description": "Agrega palabras clave para los reproductores que deseas que el sistema ignore. Cada palabra clave debe estar en una línea nueva.", diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index 6475d5ad..8778d237 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -743,6 +743,11 @@ "label": "Périphériques audio" } }, + "external-mixer": { + "description": "Entrez la commande ou le chemin d'accès de l'application à lancer lors de l'activation de la fonctionnalité de mixeur audio externe.", + "label": "Commande de mixeur audio externe", + "placeholder": "pwvucontrol || pavucontrol" + }, "media": { "excluded-player": { "description": "Ajoutez des mots-clés pour les lecteurs que le système doit ignorer. Chaque mot-clé doit être sur une nouvelle ligne.", diff --git a/Assets/Translations/nl.json b/Assets/Translations/nl.json index 03d0776e..622d3d03 100644 --- a/Assets/Translations/nl.json +++ b/Assets/Translations/nl.json @@ -743,6 +743,11 @@ "label": "Audio-apparaten" } }, + "external-mixer": { + "description": "Voer het commando of het applicatiepad in om te starten bij het activeren van de externe audiomixerfunctie.", + "label": "Extern audio mixer commando", + "placeholder": "pwvucontrol || pavucontrol" + }, "media": { "excluded-player": { "description": "Voeg trefwoorden toe voor spelers die het systeem moet negeren. Elk trefwoord moet op een nieuwe regel staan.", diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index b5334e0d..483fd7b4 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -743,6 +743,11 @@ "label": "Dispositivos de áudio" } }, + "external-mixer": { + "description": "Insira o comando ou o caminho do aplicativo para iniciar ao ativar o recurso de mixer de áudio externo.", + "label": "Comando de Mixer de Áudio Externo", + "placeholder": "pwvucontrol || pavucontrol" + }, "media": { "excluded-player": { "description": "Adicione palavras-chave para os reprodutores que você deseja que o sistema ignore. Cada palavra-chave deve estar em uma nova linha.", diff --git a/Assets/Translations/ru.json b/Assets/Translations/ru.json index 0866d7ad..e4e37f12 100644 --- a/Assets/Translations/ru.json +++ b/Assets/Translations/ru.json @@ -743,6 +743,11 @@ "label": "Аудиоустройства" } }, + "external-mixer": { + "description": "Введите команду или путь к приложению для запуска при активации функции внешнего аудиомикшера.", + "label": "Команда внешнего аудиомикшера", + "placeholder": "pwvucontrol || pavucontrol" + }, "media": { "excluded-player": { "description": "Добавьте ключевые слова для плееров, которые система должна игнорировать. Каждое ключевое слово должно быть на новой строке.", diff --git a/Assets/Translations/tr.json b/Assets/Translations/tr.json index 0b8b9829..e777ab7d 100644 --- a/Assets/Translations/tr.json +++ b/Assets/Translations/tr.json @@ -743,6 +743,11 @@ "label": "Ses cihazları" } }, + "external-mixer": { + "description": "Harici ses mikseri özelliği etkinleştirilirken başlatılacak komutu veya uygulama yolunu girin.", + "label": "Harici Ses Mikseri Komutu", + "placeholder": "pwvucontrol || pavucontrol" + }, "media": { "excluded-player": { "description": "Sistemin yoksaymasını istediğiniz oynatıcılar için anahtar kelimeler ekleyin. Her anahtar kelime ayrı bir satırda olmalıdır.", diff --git a/Assets/Translations/uk-UA.json b/Assets/Translations/uk-UA.json index 17ee78b2..a90dbf0c 100644 --- a/Assets/Translations/uk-UA.json +++ b/Assets/Translations/uk-UA.json @@ -743,6 +743,11 @@ "label": "Аудіопристрої" } }, + "external-mixer": { + "description": "Введіть команду або шлях до програми для запуску при активації функції зовнішнього аудіомікшера.", + "label": "Команда зовнішнього аудіомікшера", + "placeholder": "pwvucontrol || pavucontrol" + }, "media": { "excluded-player": { "description": "Додайте ключові слова для плеєрів, які система має ігнорувати. Кожне ключове слово на новому рядку.", diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index 9344fed5..cc3a23fc 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -743,6 +743,11 @@ "label": "音频设备" } }, + "external-mixer": { + "description": "输入激活外部音频混音器功能时要启动的命令或应用程序路径。", + "label": "外部音频混音器命令", + "placeholder": "pwvucontrol || pavucontrol" + }, "media": { "excluded-player": { "description": "添加您希望系统忽略的播放器关键词。每个关键词应单独占一行。", diff --git a/Commons/Settings.qml b/Commons/Settings.qml index aa1f471b..57cf6623 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -466,6 +466,7 @@ Singleton { property string visualizerQuality: "high" property list mprisBlacklist: [] property string preferredPlayer: "" + property string externalMixer: "pwvucontrol || pavucontrol" } // brightness diff --git a/Modules/Bar/Widgets/Microphone.qml b/Modules/Bar/Widgets/Microphone.qml index 5ae6b5fe..bdde4392 100644 --- a/Modules/Bar/Widgets/Microphone.qml +++ b/Modules/Bar/Widgets/Microphone.qml @@ -86,7 +86,7 @@ Item { } function openExternalMixer() { - Quickshell.execDetached(["sh", "-c", "pwvucontrol || pavucontrol"]); + Quickshell.execDetached(["sh", "-c", Settings.data.audio.externalMixer]); } NPopupContextMenu { diff --git a/Modules/Bar/Widgets/Volume.qml b/Modules/Bar/Widgets/Volume.qml index d3b874f5..796545eb 100644 --- a/Modules/Bar/Widgets/Volume.qml +++ b/Modules/Bar/Widgets/Volume.qml @@ -59,7 +59,7 @@ Item { } function openExternalMixer() { - Quickshell.execDetached(["sh", "-c", "pwvucontrol || pavucontrol"]); + Quickshell.execDetached(["sh", "-c", Settings.data.audio.externalMixer]); } Timer { diff --git a/Modules/Panels/Settings/Tabs/AudioTab.qml b/Modules/Panels/Settings/Tabs/AudioTab.qml index 34d7ab17..1b7bcb9b 100644 --- a/Modules/Panels/Settings/Tabs/AudioTab.qml +++ b/Modules/Panels/Settings/Tabs/AudioTab.qml @@ -10,11 +10,6 @@ ColumnLayout { id: root spacing: Style.marginL - NHeader { - label: I18n.tr("settings.audio.volumes.section.label") - description: I18n.tr("settings.audio.volumes.section.description") - } - property real localVolume: AudioService.volume Connections { @@ -24,6 +19,11 @@ ColumnLayout { } } + NHeader { + label: I18n.tr("settings.audio.volumes.section.label") + description: I18n.tr("settings.audio.volumes.section.description") + } + // Master Volume ColumnLayout { spacing: Style.marginXXS @@ -141,6 +141,15 @@ ColumnLayout { } } + // External mixer command + NTextInput { + label: I18n.tr("settings.audio.external-mixer.label") + description: I18n.tr("settings.audio.external-mixer.description") + placeholderText: I18n.tr("settings.audio.external-mixer.placeholder") + text: Settings.data.audio.externalMixer + onTextChanged: Settings.data.audio.externalMixer = text + } + NDivider { Layout.fillWidth: true Layout.topMargin: Style.marginL