Launch shell actions through Hyprland
This commit is contained in:
@@ -38,6 +38,17 @@ QtObject {
|
||||
return "'" + String(value || "").replace(/'/g, "'\\''") + "'"
|
||||
}
|
||||
|
||||
function luaQuote(value) {
|
||||
return "\"" + String(value || "")
|
||||
.replace(/\\/g, "\\\\")
|
||||
.replace(/"/g, "\\\"")
|
||||
.replace(/\n/g, "\\n") + "\""
|
||||
}
|
||||
|
||||
function hyprExecCommand(command) {
|
||||
return ["hyprctl", "dispatch", "hl.dsp.exec_cmd(" + luaQuote(command) + ")"]
|
||||
}
|
||||
|
||||
function isPlainObject(value) {
|
||||
return value !== null && typeof value === "object" && !Array.isArray(value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user