1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-13 06:33:30 -04:00

feat: implement interactive microphone volume OSD and IPC controls (#2406)

* feat: implement interactive microphone volume OSD and persistence

Addresses #2388

* refactor: reduce scope to interactive microphone OSD and IPC controls only
This commit is contained in:
Huỳnh Thiện Lộc
2026-05-22 20:00:12 +07:00
committed by GitHub
parent 39622eb62a
commit aaff1ab61e
7 changed files with 325 additions and 35 deletions
+30
View File
@@ -1794,6 +1794,36 @@ Item {
target: "outputs"
}
IpcHandler {
target: "mic"
function setvolume(percentage: string): string {
return AudioService.setMicVolume(parseInt(percentage));
}
function increment(step: string): string {
return AudioService.incrementMicVolume(step);
}
function decrement(step: string): string {
return AudioService.decrementMicVolume(step);
}
function mute(): string {
return AudioService.toggleMicMute();
}
function status(): string {
if (!AudioService.source || !AudioService.source.audio) {
return "No audio source available";
}
const volume = Math.round(AudioService.source.audio.volume * 100);
const muteStatus = AudioService.source.audio.muted ? " (muted)" : "";
return `Microphone: ${volume}%${muteStatus}`;
}
}
IpcHandler {
function findTrayItem(itemId: string): var {
if (!itemId)