14 lines
526 B
Lua
14 lines
526 B
Lua
|
|
local helper = jarvis.context.command_path .. "\\_sysinfo.ps1"
|
||
|
|
local cmd = string.format('powershell -NoProfile -ExecutionPolicy Bypass -File "%s" -Topic disk', helper)
|
||
|
|
local res = jarvis.system.exec(cmd)
|
||
|
|
local text = (res.stdout or ""):gsub("[\r\n]+$", "")
|
||
|
|
if res.success and text ~= "" then
|
||
|
|
jarvis.system.notify("Диск", text)
|
||
|
|
jarvis.log("info", text)
|
||
|
|
jarvis.audio.play_ok()
|
||
|
|
else
|
||
|
|
jarvis.log("error", "disk info failed: " .. tostring(res.stderr))
|
||
|
|
jarvis.audio.play_error()
|
||
|
|
end
|
||
|
|
return { chain = false }
|