mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
workspaces: add desktop entries binding
This commit is contained in:
@@ -17,9 +17,17 @@ Item {
|
|||||||
property real barThickness: 48
|
property real barThickness: 48
|
||||||
property var hyprlandOverviewLoader: null
|
property var hyprlandOverviewLoader: null
|
||||||
property var parentScreen: null
|
property var parentScreen: null
|
||||||
|
property int _desktopEntriesUpdateTrigger: 0
|
||||||
readonly property var sortedToplevels: {
|
readonly property var sortedToplevels: {
|
||||||
return CompositorService.filterCurrentWorkspace(CompositorService.sortedToplevels, screenName);
|
return CompositorService.filterCurrentWorkspace(CompositorService.sortedToplevels, screenName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: DesktopEntries
|
||||||
|
function onApplicationsChanged() {
|
||||||
|
_desktopEntriesUpdateTrigger++
|
||||||
|
}
|
||||||
|
}
|
||||||
property int currentWorkspace: {
|
property int currentWorkspace: {
|
||||||
if (CompositorService.isNiri) {
|
if (CompositorService.isNiri) {
|
||||||
return getNiriActiveWorkspace()
|
return getNiriActiveWorkspace()
|
||||||
@@ -43,6 +51,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getWorkspaceIcons(ws) {
|
function getWorkspaceIcons(ws) {
|
||||||
|
_desktopEntriesUpdateTrigger
|
||||||
if (!SettingsData.showWorkspaceApps || !ws) {
|
if (!SettingsData.showWorkspaceApps || !ws) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user