Added basic Calendar menu (WIP)

This commit is contained in:
Jas Singh
2024-06-26 02:00:53 -07:00
parent 2b8eb9144d
commit 4ff2392c48
17 changed files with 189 additions and 47 deletions

View File

@@ -8,7 +8,6 @@ export const Padding = (name) =>
child: Widget.Box(),
setup: (w) => w.on("button-press-event", () => App.toggleWindow(name)),
});
const moveBoxToCursor = (self, minWidth, minHeight, fixed) => {
globalMousePos.connect("changed", ({ value }) => {
let monWidth = hyprland.monitors[hyprland.active.monitor.id].width;
@@ -73,6 +72,7 @@ export default ({
moveBoxToCursor(self, minWidth, minHeight, fixed);
},
child: Widget.Box({
class_name: "dropdown-menu-container",
css: "padding: 1px; margin: -1px;",
child: Widget.Revealer({
revealChild: false,

View File

@@ -0,0 +1,34 @@
import PopupWindow from "../PopupWindow.js";
import icons from "../../icons/index.js";
export default () => {
return PopupWindow({
name: "calendarmenu",
visible: false,
transition: "crossfade",
layout: "top-right",
child: Widget.Box({
class_name: "calendar-menu-content",
css: "padding: 1px; margin: -1px;",
vexpand: false,
children: [
Widget.Box({
class_name: "calendar-content-container",
children: [
Widget.Box({
class_name: "calendar-content-items",
children: [
Widget.Calendar({
class_name: "calendar-menu-calendar",
showDayNames: true,
showDetails: true,
showHeading: true,
}),
],
}),
],
}),
],
}),
});
};

View File

@@ -5,5 +5,6 @@ import NetworkMenu from "./network/index.js";
import BluetoothMenu from "./bluetooth/index.js";
import MediaMenu from "./media/index.js";
import NotificationsMenu from "./notifications/index.js";
import CalendarMenu from "./calendar/index.js";
export default [PowerMenu(), Verification(), AudioMenu(), NetworkMenu(), BluetoothMenu(), MediaMenu(), NotificationsMenu()];
export default [PowerMenu(), Verification(), AudioMenu(), NetworkMenu(), BluetoothMenu(), MediaMenu(), NotificationsMenu(), CalendarMenu()];

View File

@@ -398,6 +398,18 @@ export default () => {
});
}
if (sortedNetworks.length <= 0) {
return self.children = [
Widget.Label({
class_name: "not-found-label dim",
expand: true,
hpack: "center",
vpack: "center",
label: "No Wifi Networks Found"
})
]
}
return (self.children = sortedNetworks.map((accPoint) => {
return Widget.Box({
vertical: true,

View File

@@ -63,6 +63,7 @@ export default () => {
}),
Widget.Button({
class_name: "clear-notifications-button",
tooltip_text: "Clear Notifications",
on_primary_click: () => notifs.clear(),
child: Widget.Label({
class_name: "clear-notifications-label",