brightess and volume control

This commit is contained in:
2026-03-26 13:15:54 -07:00
parent 80efc104ed
commit 5b8d82a934
20 changed files with 588 additions and 37 deletions

View File

@@ -18,9 +18,11 @@ Item {
width: 24
property var workspace: Hyprland.workspaces.values.find(ws => ws.id === modelData+1)
property var icon: {
const appId = workspace ? Array.from(workspace.toplevels.values).sort(
(a, b) => b.lastIpcObject.focusHistoryId - a.lastIpcObject.focusHistoryId
)[0]?.wayland?.appId : undefined
let appId
if (workspace) {
let toplevel = Array.from(workspace.toplevels.values).reduce((prev, curr) => (prev.lastIpcObject.focusHistoryID < curr.lastIpcObject.focusHistoryID) ? prev : curr)
appId = toplevel.wayland?.appId
}
return DesktopEntries.applications.values.find(
app => app.startupClass === appId || app.id === appId
)?.icon;
@@ -59,4 +61,8 @@ Item {
height: 4
radius: height/2
}
Connections {
target: Hyprland
function onActiveToplevelChanged() {Hyprland.refreshToplevels()}
}
}