FlexWinTitle Module - bakkeby/dusk GitHub Wiki
The FlexWinTitle module shows window titles in the bar grouped by the area the window belongs to.
The groups include master, stack, secondary stack, floating and hidden. More so the groups are arranged to reflect the layout used, e.g. for a centered master layout the secondary stack would be listed first, the master client(s) next, and stack clients last.
The module is controlled by this entry in the barrules
array in
config.h.
{ -1, 0, 0, 5, 0, 0, BAR_ALIGN_NONE, size_flexwintitle, draw_flexwintitle, click_flexwintitle, "flexwintitle" },
Refer to the Bar Rules page for general information on rules configuration.
Clicks on the workspace module will result in a ClkWinTitle
click type that can be filtered
on in the button bindings.
Example bindings as per the default configuration:
{ ClkWinTitle, ..., focuswin, {0} }, // focus on the given client
{ ClkWinTitle, ..., showhideclient, {0} }, // hide the currently selected client (or show if hidden)
{ ClkWinTitle, ..., zoom, {0} }, // moves the currently focused window to/from the master area (for tiled layouts)
When the argument for the button bindings is {0}
then the bar module will set the argument based
on which of the window titles the user clicked on. If the argument is explicitly set then that
argument takes precedence.
This means that functions handling clicks on the window title module must be able to handle client references.
Also see the Button Bindings page.
The size of window titles relative to other window titles are determined by the weight of the group a window belongs to.
The weights are determined by the flexwintitle settings defined in config.h:
static int flexwintitle_masterweight = 15; // master weight compared to hidden and floating window titles
static int flexwintitle_stackweight = 4; // stack weight compared to hidden and floating window titles
static int flexwintitle_hiddenweight = 0; // hidden window title weight
static int flexwintitle_floatweight = 0; // floating window title weight, set to 0 to not show floating windows
As per the default configuration window titles for clients in the master area are nearly four times wider than window titles for clients in the stack area(s).
If the weight is 0
, as in the case for hidden and floating windows, then the window titles are not
drawn by the module. If the weight for floating windows were to be set to 1
for example, then
the size of such a window title would be a quarter of stack window titles and one fifteenth of
master window titles.
If all weights have the same value then the space is divided evenly between all drawn window titles.
Refer to the WinTitle Floating module and the WinTitle Hidden module for alternative display options for window titles of hidden and floating clients.
The size of the separator between window titles is determined by the flexwintitle_separator
setting in config.h.
static int flexwintitle_separator = borderpx; // width of client separator
By default this is set to the same value as the border pixel size to match the size of the bar border.
The colour of the separator will be the same as that of the bar border which by default will be the same as that of the master area which again depends on the layout.
If the BarActiveGroupBorderColor functionality is enabled then the colour of the bar separator will be the same as that of the currently active area, which means that the colour may change when focus moves between master and stack areas.
If the BarMasterGroupBorderColor functionality is enabled then the colour of the bar separator will be the same as the master group of the current layout.
If both functionalities are disabled then the bar separator colour will be that of the
SchemeTitleNorm
colour scheme.
The indicator for floating windows can be controlled by the indicators
settings in
config.h:
[IndicatorTiled] = INDICATOR_NONE,
[IndicatorFloating] = INDICATOR_TOP_LEFT_LARGER_SQUARE,
By default tiled window titles have no special indicators.
There are also indicators specifically for windows where fake fullscreen has been enabled.
Refer to the Bar Indicators page for options.
Window titles are centered within their allocated space when the CenteredWindowName functionality is enabled and they will be left aligned if the functionality is disabled.
An window icon will be shown on the left of the window title if the application provides one.
The display of icons can be enabled via the WinTitleIcons functionality.
The size of the icon is determined by the iconsize
variable in
config.h.
static const int iconsize = 16; /* icon size */
static const int iconspacing = 5; /* space between icon and title */
The spacing between the icon and the window title is determined by the iconspacing
variable.
The colours for window titles generally depend on the state of a window.
For example a scratchpad window maybe presented using the SchemeScratchNorm
and SchemeScratchSel
colour schemes, while a marked window will be presented using the SchemeMarked
colour scheme.
Likewise hidden or urgent windows will be presented with designated colour schemes.
When it comes to normal windows these will by default be presented using the SchemeTitleNorm
and
SchemeTitleSel
colour schemes.
If the FlexWinBorders functionality, however, is enabled then the SchemeFlex*
colour schemes
will be used to present both window titles as well as the border colours of windows.
The way it works is that client windows will be represented by designated colour schemes for the particular arrangement they are subject to.
For example let's say that we have a master and a stack area where clients in the master area are tiled left to right (vertically) while the clients in the stack area are tiled top to bottom (horizontally).
Clients in the master area will then be drawn using SchemeFlexInaLTR
and clients in the stack
area will be drawn using SchemeFlexInaTTB
.
Additionally if there are, say, three clients in the stack area and one of them is the selected
client then the selected client will be drawn using SchemeFlexSelTTB
. As focus is on the stack
area the other two clients are then drawn using the SchemeFlexActTTB
(as in the stack area is
active). This allows for effects like having the master and stack areas light up when focus is
moved between them.
Below is a breakdown of the many SchemeFlex*
colour schemes that are available. These are not
explicitly listed in the colors
array in the default configuration, but they can be controlled
using Xresource strings.
Colour Scheme | Description | Foreground | Background | Border |
---|---|---|---|---|
SchemeFlexActTTB | Top to bottom (active) | dusk.act.TTB.fg.color | dusk.act.TTB.bg.color | dusk.act.TTB.border.color |
SchemeFlexInaTTB | Top to bottom (inactive) | dusk.norm.TTB.fg.color | dusk.norm.TTB.bg.color | dusk.norm.TTB.border.color |
SchemeFlexSelTTB | Top to bottom (selected) | dusk.sel.TTB.fg.color | dusk.sel.TTB.bg.color | dusk.sel.TTB.border.color |
SchemeFlexActLTR | Left to right (active) | dusk.act.LTR.fg.color | dusk.act.LTR.bg.color | dusk.act.LTR.border.color |
SchemeFlexInaLTR | Left to right (inactive) | dusk.norm.LTR.fg.color | dusk.norm.LTR.bg.color | dusk.norm.LTR.border.color |
SchemeFlexSelLTR | Left to right (selected) | dusk.sel.LTR.fg.color | dusk.sel.LTR.bg.color | dusk.sel.LTR.border.color |
SchemeFlexActMONO | Monocle (active) | dusk.act.MONO.fg.color | dusk.act.MONO.bg.color | dusk.act.MONO.border.color |
SchemeFlexInaMONO | Monocle (inactive) | dusk.norm.MONO.fg.color | dusk.norm.MONO.bg.color | dusk.norm.MONO.border.color |
SchemeFlexSelMONO | Monocle (selected) | dusk.sel.MONO.fg.color | dusk.sel.MONO.bg.color | dusk.sel.MONO.border.color |
SchemeFlexActGRID | Grid (active) | dusk.act.GRID.fg.color | dusk.act.GRID.bg.color | dusk.act.GRID.border.color |
SchemeFlexInaGRID | Grid (inactive) | dusk.norm.GRID.fg.color | dusk.norm.GRID.bg.color | dusk.norm.GRID.border.color |
SchemeFlexSelGRID | Grid (selected) | dusk.sel.GRID.fg.color | dusk.sel.GRID.bg.color | dusk.sel.GRID.border.color |
SchemeFlexActGRIDC | Grid (cfacts) (active) | dusk.act.GRIDC.fg.color | dusk.act.GRIDC.bg.color | dusk.act.GRIDC.border.color |
SchemeFlexInaGRIDC | Grid (cfacts) (inactive) | dusk.norm.GRIDC.fg.color | dusk.norm.GRIDC.bg.color | dusk.norm.GRIDC.border.color |
SchemeFlexSelGRIDC | Grid (cfacts) (selected) | dusk.sel.GRIDC.fg.color | dusk.sel.GRIDC.bg.color | dusk.sel.GRIDC.border.color |
SchemeFlexActGRD1 | Grid Alternative 1 (active) | dusk.act.GRD1.fg.color | dusk.act.GRD1.bg.color | dusk.act.GRD1.border.color |
SchemeFlexInaGRD1 | Grid Alternative 1 (inactive) | dusk.norm.GRD1.fg.color | dusk.norm.GRD1.bg.color | dusk.norm.GRD1.border.color |
SchemeFlexSelGRD1 | Grid Alternative 1 (selected) | dusk.sel.GRD1.fg.color | dusk.sel.GRD1.bg.color | dusk.sel.GRD1.border.color |
SchemeFlexActGRD2 | Grid Alternative 2 (active) | dusk.act.GRD2.fg.color | dusk.act.GRD2.bg.color | dusk.act.GRD2.border.color |
SchemeFlexInaGRD2 | Grid Alternative 2 (inactive) | dusk.norm.GRD2.fg.color | dusk.norm.GRD2.bg.color | dusk.norm.GRD2.border.color |
SchemeFlexSelGRD2 | Grid Alternative 2 (selected) | dusk.sel.GRD2.fg.color | dusk.sel.GRD2.bg.color | dusk.sel.GRD2.border.color |
SchemeFlexActGRDM | Gridmode (active) | dusk.act.GRDM.fg.color | dusk.act.GRDM.bg.color | dusk.act.GRDM.border.color |
SchemeFlexInaGRDM | Gridmode (inactive) | dusk.norm.GRDM.fg.color | dusk.norm.GRDM.bg.color | dusk.norm.GRDM.border.color |
SchemeFlexSelGRDM | Gridmode (selected) | dusk.sel.GRDM.fg.color | dusk.sel.GRDM.bg.color | dusk.sel.GRDM.border.color |
SchemeFlexActHGRD | Horizontal Grid (active) | dusk.act.HGRD.fg.color | dusk.act.HGRD.bg.color | dusk.act.HGRD.border.color |
SchemeFlexInaHGRD | Horizontal Grid (inactive) | dusk.norm.HGRD.fg.color | dusk.norm.HGRD.bg.color | dusk.norm.HGRD.border.color |
SchemeFlexSelHGRD | Horizontal Grid (selected) | dusk.sel.HGRD.fg.color | dusk.sel.HGRD.bg.color | dusk.sel.HGRD.border.color |
SchemeFlexActDWDL | Fibonacci Dwindle (active) | dusk.act.DWDL.fg.color | dusk.act.DWDL.bg.color | dusk.act.DWDL.border.color |
SchemeFlexInaDWDL | Fibonacci Dwindle (inactive) | dusk.norm.DWDL.fg.color | dusk.norm.DWDL.bg.color | dusk.norm.DWDL.border.color |
SchemeFlexSelDWDL | Fibonacci Dwindle (selected) | dusk.sel.DWDL.fg.color | dusk.sel.DWDL.bg.color | dusk.sel.DWDL.border.color |
SchemeFlexActDWDLC | Fibonacci Dwindle (cfacts) (active) | dusk.act.DWDLC.fg.color | dusk.act.DWDLC.bg.color | dusk.act.DWDLC.border.color |
SchemeFlexInaDWDLC | Fibonacci Dwindle (cfacts) (inactive) | dusk.norm.DWDLC.fg.color | dusk.norm.DWDLC.bg.color | dusk.norm.DWDLC.border.color |
SchemeFlexSelDWDLC | Fibonacci Dwindle (cfacts) (selected) | dusk.sel.DWDLC.fg.color | dusk.sel.DWDLC.bg.color | dusk.sel.DWDLC.border.color |
SchemeFlexActSPRL | Fibonacci Spiral (active) | dusk.act.SPRL.fg.color | dusk.act.SPRL.bg.color | dusk.act.SPRL.border.color |
SchemeFlexInaSPRL | Fibonacci Spiral (inactive) | dusk.norm.SPRL.fg.color | dusk.norm.SPRL.bg.color | dusk.norm.SPRL.border.color |
SchemeFlexSelSPRL | Fibonacci Spiral (selected) | dusk.sel.SPRL.fg.color | dusk.sel.SPRL.bg.color | dusk.sel.SPRL.border.color |
SchemeFlexActSPRLC | Fibonacci Spiral (cfacts) (active) | dusk.act.SPRLC.fg.color | dusk.act.SPRLC.bg.color | dusk.act.SPRLC.border.color |
SchemeFlexInaSPRLC | Fibonacci Spiral (cfacts) (inactive) | dusk.norm.SPRLC.fg.color | dusk.norm.SPRLC.bg.color | dusk.norm.SPRLC.border.color |
SchemeFlexSelSPRLC | Fibonacci Spiral (cfacts) (selected) | dusk.sel.SPRLC.fg.color | dusk.sel.SPRLC.bg.color | dusk.sel.SPRLC.border.color |
SchemeFlexActTTMI | Tatami (active) | dusk.act.TTMI.fg.color | dusk.act.TTMI.bg.color | dusk.act.TTMI.border.color |
SchemeFlexInaTTMI | Tatami (inactive) | dusk.norm.TTMI.fg.color | dusk.norm.TTMI.bg.color | dusk.norm.TTMI.border.color |
SchemeFlexSelTTMI | Tatami (selected) | dusk.sel.TTMI.fg.color | dusk.sel.TTMI.bg.color | dusk.sel.TTMI.border.color |
SchemeFlexActTTMIC | Tatami (cfacts) (active) | dusk.act.TTMIC.fg.color | dusk.act.TTMIC.bg.color | dusk.act.TTMIC.border.color |
SchemeFlexInaTTMIC | Tatami (cfacts) (inactive) | dusk.norm.TTMIC.fg.color | dusk.norm.TTMIC.bg.color | dusk.norm.TTMIC.border.color |
SchemeFlexSelTTMIC | Tatami (cfacts) (selected) | dusk.sel.TTMIC.fg.color | dusk.sel.TTMIC.bg.color | dusk.sel.TTMIC.border.color |
SchemeFlexActFloat | Floating window (active) | dusk.act.float.fg.color | dusk.act.float.bg.color | dusk.act.float.border.color |
SchemeFlexInaFloat | Floating window (inactive) | dusk.norm.float.fg.color | dusk.norm.float.bg.color | dusk.norm.float.border.color |
SchemeFlexSelFloat | Floating window (selected) | dusk.sel.float.fg.color | dusk.sel.float.bg.color | dusk.sel.float.border.color |
Also refer to the Xresources page.
Back to Bar > Bar Modules.