1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-09 23:15:38 -05:00

dock: create an initial basic dock

This commit is contained in:
bbedward
2025-08-04 19:10:20 -04:00
parent 9dbb6b094f
commit 436c7e2234
15 changed files with 1765 additions and 6 deletions

View File

@@ -343,4 +343,35 @@ Singleton {
}
return 1
}
function focusWindow(windowId) {
if (!niriAvailable) return false
console.log("NiriService: Focusing window with command:", ["niri", "msg", "action", "focus-window", "--id", windowId.toString()])
Quickshell.execDetached(["niri", "msg", "action", "focus-window", "--id", windowId.toString()])
return true
}
function closeWindow(windowId) {
if (!niriAvailable) return false
console.log("NiriService: Closing window with command:", ["niri", "msg", "action", "close-window", "--id", windowId.toString()])
Quickshell.execDetached(["niri", "msg", "action", "close-window", "--id", windowId.toString()])
return true
}
function getWindowsByAppId(appId) {
if (!appId) return []
return windows.filter(w => w.app_id && w.app_id.toLowerCase() === appId.toLowerCase())
}
function getRunningAppIds() {
var appIds = new Set()
windows.forEach(w => {
if (w.app_id) {
appIds.add(w.app_id.toLowerCase())
}
})
return Array.from(appIds)
}
}