WIP: Somewm migration
This commit is contained in:
parent
f5caff6684
commit
ce56320097
17 changed files with 342 additions and 238 deletions
36
inspect_client.lua
Normal file
36
inspect_client.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue