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

@@ -65,13 +65,20 @@ const renderOSD = () => {
self.hook(brightness, () => {
handleReveal(self, "reveal_child");
}, "notify::kbd")
self.hook(audio.microphone, () => {
handleReveal(self, "reveal_child");
}, "notify::volume")
self.hook(audio.microphone, () => {
handleReveal(self, "reveal_child");
}, "notify::is-muted")
self.hook(audio.speaker, () => {
handleReveal(self, "reveal_child");
}, "notify::volume")
self.hook(audio.speaker, () => {
handleReveal(self, "visible");
handleReveal(self, "reveal_child");
}, "notify::is-muted")
},
child: Widget.Box({
class_name: "osd-container",
@@ -126,12 +133,17 @@ export default () => Widget.Window({
self.hook(brightness, () => {
handleReveal(self, "visible");
}, "notify::kbd")
self.hook(audio.microphone, () => {
handleReveal(self, "visible");
}, "notify::volume")
self.hook(audio.microphone, () => {
handleReveal(self, "visible");
}, "notify::is-muted")
self.hook(audio.speaker, () => {
handleReveal(self, "visible");
}, "notify::volume")
self.hook(audio.speaker, () => {
handleReveal(self, "visible");
}, "notify::is-muted")
},
})