blur fuzzel, sort workspace icons by position
This commit is contained in:
@@ -373,4 +373,10 @@ hl.layer_rule({
|
||||
blur_popups = true
|
||||
})
|
||||
|
||||
hl.layer_rule({
|
||||
match = { class = "fuzzel"},
|
||||
blur = true,
|
||||
})
|
||||
|
||||
|
||||
require("rules")
|
||||
|
||||
+26
-1
@@ -130,10 +130,22 @@ Scope {
|
||||
}
|
||||
|
||||
Row {
|
||||
id: appIconRow
|
||||
spacing: 4
|
||||
|
||||
property var sortedTopLevels: {
|
||||
const tl = barRoot.monitor?.activeWorkspace?.toplevels;
|
||||
if (!tl)
|
||||
return [];
|
||||
return tl.values.slice().sort((a, b) => {
|
||||
const ax = a.lastIpcObject?.at?.[0] ?? 0;
|
||||
const bx = b.lastIpcObject?.at?.[0] ?? 0;
|
||||
return ax - bx;
|
||||
});
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: barRoot.monitor?.activeWorkspace?.toplevels ?? null
|
||||
model: appIconRow.sortedTopLevels //barRoot.monitor?.activeWorkspace?.toplevels ?? null
|
||||
|
||||
delegate: Item {
|
||||
id: appIconRoot
|
||||
@@ -172,6 +184,19 @@ Scope {
|
||||
Hyprland.refreshToplevels();
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: Hyprland
|
||||
function onRawEvent(event) {
|
||||
positionRefreshDebounce.restart();
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: positionRefreshDebounce
|
||||
interval: 100
|
||||
onTriggered: Hyprland.refreshToplevels()
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
|
||||
Reference in New Issue
Block a user