Added an osd for microphone inputs. (#60)

This commit is contained in:
Jas Singh
2024-08-02 01:22:20 -07:00
committed by GitHub
parent 126f2b7535
commit 308e22b02f
5 changed files with 38 additions and 9 deletions

View File

@@ -19,9 +19,18 @@ export const OSDIcon = (ort: OSDOrientation) => {
self.hook(brightness, () => {
self.label = "󰥻";
}, "notify::kbd")
self.hook(audio, () => {
self.hook(audio.microphone, () => {
self.label = audio.microphone.is_muted ? "󰍭" : "󰍬";
}, "notify::volume")
self.hook(audio.microphone, () => {
self.label = audio.microphone.is_muted ? "󰍭" : "󰍬";
}, "notify::is-muted")
self.hook(audio.speaker, () => {
self.label = audio.speaker.is_muted ? "󰝟" : "󰕾";
})
}, "notify::volume")
self.hook(audio.speaker, () => {
self.label = audio.speaker.is_muted ? "󰝟" : "󰕾";
}, "notify::is-muted")
}
})
});