36 lines
1 KiB
Lua
36 lines
1 KiB
Lua
string.lpad = function(str, len, char)
|
|
if char == nil then char = ' ' end
|
|
return str .. string.rep(char, len - #str)
|
|
end
|
|
|
|
local properties = {
|
|
"window",
|
|
"name", "type", "class", "instance", "role",
|
|
"pid", "machine",
|
|
"icon_name", "icon", "icon_sizes",
|
|
"screen",
|
|
"hidden", "minimized", "size_hints_honor", "size_hints",
|
|
"border_width", "border_color",
|
|
"urgent",
|
|
"content",
|
|
"opacity",
|
|
"ontop", "above", "below",
|
|
"fullscreen", "maximized", "maximized_horizontal",
|
|
"maximized_vertical",
|
|
"transient_for", "modal", "group_window", "leader_window",
|
|
"valid", "first_tag", "marked", "is_fixed", "floating",
|
|
"sticky", "focusable", "skip_taskbar", "dockable", "shape",
|
|
"shape_bounding", "shape_clip", "shape_input",
|
|
"shape_client_bounding", "shape_client_clip", "startup_id",
|
|
"x", "y", "width", "height",
|
|
}
|
|
|
|
return function(c)
|
|
str = "client info:\n------------\n"
|
|
if (c ~= nil) then for _,prop in ipairs(properties) do
|
|
if (c[prop] ~= nil) then
|
|
str = str .. prop:lpad(20) .. "\t" .. tostring(c[prop]) .. "\n"
|
|
end
|
|
end end
|
|
return str
|
|
end
|