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.
This commit is contained in:
@@ -135,19 +135,29 @@ const filterTitle = (windowtitle: ActiveClient) => {
|
||||
const ClientTitle = () => {
|
||||
return {
|
||||
component: Widget.Box({
|
||||
children: [
|
||||
Widget.Label({
|
||||
className: Utils.merge([options.theme.bar.buttons.style.bind("value"), options.bar.windowtitle.label.bind("value")], (style, showLabel) => {
|
||||
const styleMap = {
|
||||
default: "style1",
|
||||
split: "style2",
|
||||
wave: "style3",
|
||||
};
|
||||
return `windowtitle ${styleMap[style]} ${!showLabel ? "no-label" : ""}`;
|
||||
}),
|
||||
children: options.bar.windowtitle.label.bind("value").as((showLabel) => {
|
||||
const titleIcon = Widget.Label({
|
||||
class_name: "bar-button-icon windowtitle txt-icon bar",
|
||||
label: hyprland.active.bind("client").as((v) => filterTitle(v).icon),
|
||||
}),
|
||||
Widget.Label({
|
||||
});
|
||||
const titleLabel = Widget.Label({
|
||||
class_name: "bar-button-label windowtitle",
|
||||
label: hyprland.active.bind("client").as((v) => filterTitle(v).label),
|
||||
})
|
||||
]
|
||||
});
|
||||
return showLabel ? [titleIcon, titleLabel] : [titleIcon];
|
||||
}),
|
||||
}),
|
||||
isVisible: true,
|
||||
boxClass: "windowtitle",
|
||||
props: {}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user