-
Notifications
You must be signed in to change notification settings - Fork 23
setwfact
Function | Expected argument | Default keybindings |
---|---|---|
setwfact | float, e.g. 0.25 or -0.25
|
N/A |
The setwfact
function increases or decreases the size of the selected workspace in relation
to other workspaces currently being viewed.
More precisely it changes the wfact (workspace factor) variable for the selected workspace.
The value of the workspace factor may seem somewhat arbitrary, but one may think of it as the
weight of a workspace compared to other workspaces. The behaviour is identical to how the
cfact
(client factor) works in layouts that support it, just that it applies to workspaces when
more than one is viewed at the same time.
The default wfact
value for a workspace is 1.0 and the size allocated is derived by the factor of
each individual workspace divided by the sum of the workspace factors.
As all workspaces initially have the same value the space is divided evenly when viewing multiple workspaces.
1.0 / (1.0 + 1.0) = 0.50
If the wfact
for the second workspace in the area is increased to 1.5 then this means that
it will take up a 60% of the monitor's window area while the first workspace will take up 40%.
1.0 / (1.0 + 1.5) = 0.40
1.5 / (1.0 + 1.5) = 0.60
The minimum value of wfact
is 0.25 and the maximum value is 4.0. One may think of this as a
quarter of the initial weight and four times the initial weight.
The argument passed to the function indicates how much to increase or decrease the client factor with and by default these are 0.25 and -0.25 respectively.
The wfact
can also be set absolutely with argument values greater than 4.0 (in which case 4.0 is
subtracted from the value used). E.g. passing 8.0 will set the factor as 4.0 which is the maximum
weight a workspace can have.
The wfact
can also be reverted back to default (1.0) by passing the value of 0.
There are no default keybindings to increase or decrease the wfact
value, but these can be added
to your personal configuration as needed.
External commands:
duskc run_command setwfact 0.25 # increases the workspace factor by a quarter weight
duskc run_command setwfact -0.25 # decrease the workspace factor by a quarter weight
duskc run_command setwfact 0 # reset workspace factor back to default weight (1.0)
duskc run_command setwfact 8.0 # explicitly set wfact to 4.0 (maximum weight)
duskc run_command setwfact 4.25 # explicitly set wfact to 0.25 (minimum weight)
Concepts | Configuration | Features | Flags | Functionality | Functions