brightess and volume control
This commit is contained in:
@@ -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()}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user