Implemented strict linting standards and prettier formatting config. (#248)
* Implemented strict linting standards and prettier formatting config. * More linter fixes and type updates. * More linter updates and type fixes * Remove noisy comments * Linter and type updates * Linter, formatting and type updates. * Linter updates * Type updates * Type updates * fixed all linter errors * Fixed all linting, formatting and type issues. * Resolve merge conflicts.
This commit is contained in:
@@ -1,36 +1,62 @@
|
||||
import brightness from "services/Brightness"
|
||||
const audio = await Service.import("audio")
|
||||
import { Attribute, Child } from 'lib/types/widget';
|
||||
import brightness from 'services/Brightness';
|
||||
import Box from 'types/widgets/box';
|
||||
const audio = await Service.import('audio');
|
||||
|
||||
export const OSDIcon = () => {
|
||||
export const OSDIcon = (): Box<Child, Attribute> => {
|
||||
return Widget.Box({
|
||||
class_name: "osd-icon-container",
|
||||
class_name: 'osd-icon-container',
|
||||
hexpand: true,
|
||||
child: Widget.Label({
|
||||
class_name: "osd-icon txt-icon",
|
||||
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")
|
||||
}
|
||||
})
|
||||
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',
|
||||
);
|
||||
},
|
||||
}),
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user