* WIP * Fix nerdfont icon alignments * Ship needed fonts * Remove italicised fonts * Update readme and separate OSD settings into their own category. * Dashboard styling updates --------- Co-authored-by: matavach <erik@matijevich.org>
38 lines
1.4 KiB
TypeScript
38 lines
1.4 KiB
TypeScript
import { OSDOrientation } from "lib/types/options";
|
|
import brightness from "services/Brightness"
|
|
const audio = await Service.import("audio")
|
|
|
|
export const OSDIcon = (ort: OSDOrientation) => {
|
|
return Widget.Box({
|
|
class_name: "osd-icon-container",
|
|
hexpand: true,
|
|
child: Widget.Label({
|
|
class_name: "osd-icon txt-icon",
|
|
hexpand: true,
|
|
vexpand: true,
|
|
hpack: "center",
|
|
vpack: "center",
|
|
setup: self => {
|
|
self.hook(brightness, () => {
|
|
self.label = "";
|
|
}, "notify::screen")
|
|
self.hook(brightness, () => {
|
|
self.label = "";
|
|
}, "notify::kbd")
|
|
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")
|
|
}
|
|
})
|
|
});
|
|
}
|