1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

keybinds: add toggleWithPath

This commit is contained in:
bbedward
2025-11-14 09:03:27 -05:00
parent 0d7c2e1024
commit 67c642de4c
2 changed files with 51 additions and 1 deletions

View File

@@ -16,7 +16,15 @@ Singleton {
Process {
id: getKeybinds
running: false
command: ["dms", "keybinds", "show", root.currentProvider]
command: {
let baseCmd = ["dms", "keybinds", "show"]
if (root.overridePath) {
baseCmd.push("--path")
baseCmd.push(root.overridePath)
}
baseCmd.push(root.currentProvider)
return baseCmd
}
stdout: StdioCollector {
onStreamFinished: {
@@ -44,11 +52,19 @@ Singleton {
}
}
property string overridePath: ""
function loadProvider(provider) {
root.currentProvider = provider
reload()
}
function loadProviderWithPath(provider, path) {
root.currentProvider = provider
root.overridePath = path
reload()
}
function reload() {
if (getKeybinds.running) {
getKeybinds.running = false