dispatch qts
This commit is contained in:
1 parent
9472f380be
commit
70a6437c7f
4 files changed
+31
-4
No files matched your search
@@ -61,8 +61,16 @@ Item {
|
||||
} else {
|
||||
elm.dims = [100, 100];
|
||||
}
|
||||
testIt(Array.isArray(elm.exec) && elm.exec.length > 0, `expected exec to be a non-empty array, got ${elm.exec}`)
|
||||
testIt(elm.exec.every(arg => typeof arg === 'string'), 'expected all exec entries to be strings')
|
||||
const hasExec = elm.exec !== undefined
|
||||
const hasDispatch = elm.hyprlandDispatch !== undefined
|
||||
testIt(hasExec !== hasDispatch, 'specify exactly one of exec or hyprlandDispatch')
|
||||
if (hasExec) {
|
||||
testIt(Array.isArray(elm.exec) && elm.exec.length > 0, `expected exec to be a non-empty array, got ${elm.exec}`)
|
||||
testIt(elm.exec.every(arg => typeof arg === 'string'), 'expected all exec entries to be strings')
|
||||
} else {
|
||||
isString('hyprlandDispatch', elm.hyprlandDispatch)
|
||||
testIt(elm.hyprlandDispatch.length > 0, 'expected hyprlandDispatch to be a non-empty string')
|
||||
}
|
||||
if (!elm.isIcon)
|
||||
elm.image = resolveImagePath(elm.image)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user