Files
custum-hyprpanel/modules/bar/menu/index.ts
Jas Singh 2908ff7dd6 Added 3 new styles for bar buttons. (#168)
* Added a new style called split for bar buttons

* Added wavy button styles.

* Added padding configuration

* Update bar padding

* Fix styling for battery style2

* Fix icon only setting for bar

* Update types and options

* Add button style to exported theme props.

* Fix top margin for menus.
2024-08-24 00:01:21 -07:00

32 lines
967 B
TypeScript

import Gdk from 'gi://Gdk?version=3.0';
import { openMenu } from "../utils.js";
import options from "options";
const Menu = () => {
return {
component: Widget.Box({
className: Utils.merge([options.theme.bar.buttons.style.bind("value")], (style) => {
const styleMap = {
default: "style1",
split: "style2",
wave: "style3",
};
return `dashboard ${styleMap[style]}`;
}),
child: Widget.Label({
class_name: "bar-menu_label bar-button_icon txt-icon bar",
label: options.bar.launcher.icon.bind("value"),
}),
}),
isVisible: true,
boxClass: "dashboard",
props: {
on_primary_click: (clicked: any, event: Gdk.Event) => {
openMenu(clicked, event, "dashboardmenu");
},
},
};
};
export { Menu };