mirror of
https://github.com/zoriya/flake.git
synced 2026-06-01 18:26:18 +00:00
Add layout name in ags
This commit is contained in:
@@ -24,9 +24,7 @@ export const Bar = (monitor) =>
|
||||
monitor,
|
||||
labels: ["一", "二", "三", "四", "五", "六", "七", "八", "九"],
|
||||
}),
|
||||
// dwl.Layout({
|
||||
// mon: monId,
|
||||
// }),
|
||||
wm.Layout({ monitor }),
|
||||
wm.ClientLabel({ monitor }),
|
||||
],
|
||||
}),
|
||||
|
||||
@@ -66,6 +66,18 @@ const TagItem = ({ occupied, selected, urgent, i, output, label }) =>
|
||||
child: Widget.Label({ label, className: "tags" }),
|
||||
});
|
||||
|
||||
/** @param {{monitor: number } & import("types/widgets/label").LabelProps} props */
|
||||
export const Layout = ({ monitor, ...props }) =>
|
||||
Widget.Label(props).hook(
|
||||
river,
|
||||
(self) => {
|
||||
const output = getOutput(monitor);
|
||||
if (!output) return;
|
||||
self.label = output.layout_name;
|
||||
},
|
||||
"changed",
|
||||
);
|
||||
|
||||
/** @param {{monitor: number, fallback?: string} & import("types/widgets/label").LabelProps} props */
|
||||
export const ClientLabel = ({ monitor, fallback = "", ...props }) =>
|
||||
Widget.Label({
|
||||
|
||||
Reference in New Issue
Block a user