From VisionaireWiki
Jump to navigation Jump to search


Creates a new workspace

If window-name is omitted the default-parent is used or a name is created automatically. After execution the new window is the default parent and the default-layout is empty.

Lua Syntax:

workspace( [windowName], {flags=1, 
    token = token, 
    edit = true|false, 
    query = "token"|"locked", 
    freeze = true|false, 
    position = {x=int,y=int}, 
    size = {x=int,y=int}, 
    border = "[lrtb] width", 
    align = "left"|"right"|"center"|"top"|"bottom", 
    expand = "shaped", 
    proportion = int})



"string" - Name of the new workspace-window or workspace to edit/query.



Specifies a string-token to store with the workspace.
token - An arbitrary string.


If true then edit an existing workspace.


If true then query a value from an existing workspace.
"token"|"locked" - "token": query the workspace token. "locked": query if the workspace is currently locked which means that it is not allowed to add or remove any elements to/from the workspace.


If true then the workspace will be frozen (layout is not updated and workspace not shown).If false then the workspace is thawn (layout is updated again and workspace is shown).If flag is not specified then the workspace is neither frozen nor thawn.


Specifies the position of the window.


Specifies the size of the window.


This flag specifies to which side(s) of the control a border will be applied to.
"[lrtb] width" - First group is a string combining characters standing for 'left', 'right', 'top' and 'bottom' side.After a space the width of the border in pixel is specified.


Specifies the alignment of the item within the space allotted to it by the layout.
"left"|"right"|"center"|"top"|"bottom" - Alignment of control. Top- and bottom-align only makes sense in a row-layout, left- and right-align in a column layout.


Specifies whether the item will be expanded to fill the space assigned to the item.
"shaped" - With this argument the item will be expanded as much as possible while also maintaining its aspect ratio


Used in row- and column-layout to indicate if a child of a layout can change its size in the main orientation of the layout - where 0 stands for not changeable and a value of more than zero is interpreted relative to the value of other children of the same layout.

Return Values

Token successfully stored in workspace.
No window specified or default-parent is empty or not a workspace.
Name of the new/edited workspace or queried token.
Command failed because default-parent was empty.