pinnacle/pinnacle_api_lua/client.lua
2023-06-18 19:30:52 -05:00

23 lines
612 B
Lua

local M = {}
---Close a window.
---@param client_id integer? The id of the window you want closed, or nil to close the currently focused window, if any.
function M.close_window(client_id)
SendMsg({
CloseWindow = {
client_id = client_id or "nil",
},
})
end
---Toggle a window's floating status.
---@param client_id integer? The id of the window you want to toggle, or nil to toggle the currently focused window, if any.
function M.toggle_floating(client_id)
SendMsg({
ToggleFloating = {
client_id = client_id or "nil",
},
})
end
return M