Added workspaces, window titles, volume, bluetooth, systray and date/time modules to the panel

This commit is contained in:
Jas Singh
2024-06-09 01:25:57 -07:00
commit 6ff50006f2
33 changed files with 2001 additions and 0 deletions

36
modules/menu/menu.js Normal file
View File

@@ -0,0 +1,36 @@
import Widget from "resource:///com/github/Aylur/ags/widget.js";
/**
* @param {Object} param
* @param {string} param.title
* @param {string} param.icon
* @param {import('gi://Gtk').Gtk.Widget} param.content
* @param {import('gi://Gtk').Gtk.Widget} [param.headerChild]
* @return {import('types/widgets/box').default}
*/
export default ({title, icon, content, headerChild = Widget.Box()}) => Widget.Box({
children: [
Widget.Box({
class_name: "qs-menu",
vertical: true,
children: [
Widget.Box({
class_name: "qs-title",
spacing: 5,
children: [
Widget.Icon(icon),
Widget.Label(title),
Widget.Box({hexpand: true}),
headerChild
],
}),
Widget.Separator(),
Widget.Box({
class_name: "qs-content",
children: [content],
}),
],
})
],
});