WIP - Refactor media menu

This commit is contained in:
Jas Singh
2024-07-10 00:46:24 -07:00
parent 81ecf205be
commit 6cda814d9b
14 changed files with 358 additions and 564 deletions

View File

@@ -11,6 +11,7 @@ const Controls = () => {
expand: true,
children: [
Widget.Button({
tooltip_text: "Toggle Wifi",
expand: true,
setup: (self) => {
self.hook(network, () => {
@@ -27,6 +28,7 @@ const Controls = () => {
}),
}),
Widget.Button({
tooltip_text: "Toggle Bluetooth",
expand: true,
class_name: bluetooth
.bind("enabled")
@@ -39,6 +41,7 @@ const Controls = () => {
}),
}),
Widget.Button({
tooltip_text: "Toggle Notifications",
expand: true,
class_name: notifications
.bind("dnd")
@@ -51,6 +54,7 @@ const Controls = () => {
}),
}),
Widget.Button({
tooltip_text: "Toggle Mute (Playback)",
expand: true,
on_primary_click: () =>
(audio.speaker.is_muted = !audio.speaker.is_muted),
@@ -68,6 +72,7 @@ const Controls = () => {
}),
}),
Widget.Button({
tooltip_text: "Toggle Mute (Microphone)",
expand: true,
on_primary_click: () =>
(audio.microphone.is_muted = !audio.microphone.is_muted),