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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user