Fix hyprland rules/window orders & addback layout count

This commit is contained in:
2025-05-18 21:28:20 +02:00
parent 4e73628d6c
commit 32942aa0d0
3 changed files with 26 additions and 5 deletions
+6 -5
View File
@@ -89,10 +89,10 @@ bindm = SUPER, mouse:273, resizewindow
bind = Super, c, killactive
bind = Super+Shift, c, forcekillactive
bind = Super, k, layoutmsg, cyclenext
bind = Super, j, layoutmsg, cycleprev
bind = Super+Shift, k, layoutmsg, swapnext
bind = Super+Shift, j, layoutmsg, swapprev
bind = Super, k, layoutmsg, cycleprev
bind = Super, j, layoutmsg, cyclenext
bind = Super+Shift, k, layoutmsg, swapprev
bind = Super+Shift, j, layoutmsg, swapnext
bind = Super, Return, layoutmsg, swapwithmaster
bind = Super, h, layoutmsg, mfact -0.05
@@ -143,7 +143,7 @@ bind = Super+Shift, l, exec, loginctl lock-session
windowrule = workspace 3 silent, class:discord
windowrule = workspace 3 silent, class:vesktop
windowrule = workspace 2 silent, class:Youtube Music
windowrule = workspace 2 silent, class:com.github.th_ch.youtube_music
# smart gaps
workspace = w[tv1], gapsout:0, gapsin:0
@@ -155,4 +155,5 @@ windowrule = rounding 0, floating:0, onworkspace:f[1]
exec-once = wallpaper
exec-once = ags
exec-once = [workspace 4 silent] kitty
exec-once = hyprlock --immediate
+1
View File
@@ -25,6 +25,7 @@ export const Bar = (monitor) =>
monitor,
labels: ["一", "二", "三", "四", "五", "六", "七", "八", "九"],
}),
wm.Layout({ monitor }),
wm.ClientLabel({ monitor }),
],
}),
+19
View File
@@ -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);