mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Update Volume listener for ddc controls
This commit is contained in:
parent
8abd21de31
commit
68cb3fd2de
6 changed files with 74 additions and 18 deletions
|
|
@ -741,6 +741,7 @@ struct SettingsView: View {
|
|||
SettingsSearchEntry(tab: .hudAndOSD, title: "Icon & Progress Color", keywords: ["color", "icon", "white", "black", "gray", "osd"], highlightID: SettingsTab.hudAndOSD.highlightID(for: "Icon & Progress Color")),
|
||||
SettingsSearchEntry(tab: .hudAndOSD, title: "Third-party DDC app integration", keywords: ["ddc", "third party", "external", "display", "betterdisplay", "lunar"], highlightID: SettingsTab.hudAndOSD.highlightID(for: "Third-party DDC app integration")),
|
||||
SettingsSearchEntry(tab: .hudAndOSD, title: "Third-party DDC provider", keywords: ["provider", "betterdisplay", "lunar", "integration", "refresh detection"], highlightID: SettingsTab.hudAndOSD.highlightID(for: "Third-party DDC provider")),
|
||||
SettingsSearchEntry(tab: .hudAndOSD, title: "Enable external volume control listener", keywords: ["external volume", "ddc volume", "betterdisplay volume", "lunar volume", "disable native volume"], highlightID: SettingsTab.hudAndOSD.highlightID(for: "Enable external volume control listener")),
|
||||
|
||||
// Media
|
||||
SettingsSearchEntry(tab: .media, title: "Music Source", keywords: ["media source", "controller"], highlightID: SettingsTab.media.highlightID(for: "Music Source")),
|
||||
|
|
@ -1931,6 +1932,7 @@ private struct HUDAndOSDSettingsView: View {
|
|||
private struct ExternalDisplayIntegrationsSection: View {
|
||||
@Default(.enableThirdPartyDDCIntegration) var enableThirdPartyDDCIntegration
|
||||
@Default(.thirdPartyDDCProvider) var thirdPartyDDCProvider
|
||||
@Default(.enableExternalVolumeControlListener) var enableExternalVolumeControlListener
|
||||
@ObservedObject private var betterDisplayManager = BetterDisplayManager.shared
|
||||
@ObservedObject private var lunarManager = LunarManager.shared
|
||||
|
||||
|
|
@ -1970,21 +1972,21 @@ private struct ExternalDisplayIntegrationsSection: View {
|
|||
switch thirdPartyDDCProvider {
|
||||
case .betterDisplay:
|
||||
if !betterDisplayManager.isDetected {
|
||||
return "Install [BetterDisplay](https://betterdisplay.pro) to control external display brightness and volume through Atoll's HUD."
|
||||
return "Install [BetterDisplay](https://betterdisplay.pro) to control external display brightness (and optional volume) through Atoll's HUD."
|
||||
}
|
||||
if !betterDisplayManager.isRunning {
|
||||
return "BetterDisplay is installed but not currently running. Launch BetterDisplay to enable integration."
|
||||
}
|
||||
return "BetterDisplay OSD events will be routed through Atoll's active HUD style. Make sure BetterDisplay's OSD integration is enabled in Settings › Application › Integration."
|
||||
return "BetterDisplay OSD events will be routed through Atoll's active HUD style. Brightness is always routed; volume is routed when external volume control listener is enabled below. Make sure BetterDisplay's OSD integration is enabled in Settings › Application › Integration."
|
||||
case .lunar:
|
||||
if !lunarManager.isDetected {
|
||||
return "Install [Lunar](https://lunar.fyi) to control external display brightness, contrast, and volume through Atoll's HUD via DDC."
|
||||
return "Install [Lunar](https://lunar.fyi) to control external display brightness, contrast, and optional volume through Atoll's HUD via DDC."
|
||||
}
|
||||
if !lunarManager.isRunning {
|
||||
return "Lunar is installed but not currently running. Launch Lunar to enable integration."
|
||||
}
|
||||
if lunarManager.isConnected {
|
||||
return "Connected to Lunar's DDC socket. Brightness, contrast, and volume adjustments will be shown through Atoll's HUD."
|
||||
return "Connected to Lunar's DDC socket. Brightness and contrast adjustments are shown through Atoll's HUD; volume follows when external volume control listener is enabled below."
|
||||
}
|
||||
return "Lunar is running but the socket connection is not yet established. It will connect automatically."
|
||||
}
|
||||
|
|
@ -2013,6 +2015,17 @@ private struct ExternalDisplayIntegrationsSection: View {
|
|||
}
|
||||
.settingsHighlight(id: highlightID("Third-party DDC provider"))
|
||||
|
||||
Toggle("Enable external volume control listener", isOn: $enableExternalVolumeControlListener)
|
||||
.settingsHighlight(id: highlightID("Enable external volume control listener"))
|
||||
|
||||
Text(
|
||||
enableExternalVolumeControlListener
|
||||
? "Atoll's built-in volume key interception is disabled while external volume listening is on. Volume HUD/OSD will follow \(thirdPartyDDCProvider.displayName) payloads."
|
||||
: "Atoll keeps native volume key interception. External provider volume payloads are ignored while this is off."
|
||||
)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
HStack {
|
||||
Text("Status")
|
||||
Spacer()
|
||||
|
|
@ -2039,7 +2052,7 @@ private struct ExternalDisplayIntegrationsSection: View {
|
|||
}
|
||||
} footer: {
|
||||
if enableThirdPartyDDCIntegration {
|
||||
Text("Atoll listens to the selected provider and renders its brightness/volume HUD updates using your currently active HUD style above.")
|
||||
Text("Atoll always listens to selected-provider brightness events, and listens to provider volume events only when external volume listener is enabled.")
|
||||
.foregroundStyle(.secondary)
|
||||
.font(.caption)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue