mirror of
https://github.com/zoriya/flake.git
synced 2026-08-15 18:43:42 +00:00
Fix hyprland rules/window orders & addback layout count
This commit is contained in:
@@ -25,6 +25,7 @@ export const Bar = (monitor) =>
|
||||
monitor,
|
||||
labels: ["一", "二", "三", "四", "五", "六", "七", "八", "九"],
|
||||
}),
|
||||
wm.Layout({ monitor }),
|
||||
wm.ClientLabel({ monitor }),
|
||||
],
|
||||
}),
|
||||
|
||||
@@ -43,6 +43,25 @@ export const Tags = ({ monitor, labels, ...props }) => {
|
||||
});
|
||||
};
|
||||
|
||||
/** @param {{monitor: number } & import("types/widgets/label").LabelProps} props */
|
||||
export const Layout = ({ monitor, ...props }) => {
|
||||
const monName = getMonitorName(monitor);
|
||||
return Widget.Label({
|
||||
className: "module",
|
||||
...props,
|
||||
}).hook(
|
||||
hyprland,
|
||||
(self) => {
|
||||
const mon = hyprland.monitors.find((x) => x.name === monName);
|
||||
const ws = hyprland.workspaces.find(
|
||||
(x) => x.id === mon?.activeWorkspace?.id,
|
||||
);
|
||||
self.label = ws?.windows ? `[${ws?.windows}]` : "";
|
||||
},
|
||||
"changed",
|
||||
);
|
||||
}
|
||||
|
||||
/** @param {{monitor: number, fallback?: string} & import("types/widgets/label").LabelProps} props */
|
||||
export const ClientLabel = ({ monitor, fallback = "", ...props }) => {
|
||||
const monName = getMonitorName(monitor);
|
||||
|
||||
Reference in New Issue
Block a user