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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user