WorkspaceLabels - bakkeby/dusk GitHub Wiki

The WorkspaceLabels functionality, if enabled, will allow for the workspace icon on the bar to be accompanied with a label indicating the primary client window on that workspace.

The workspace label is based on the label of the first tiled window (i.e. the master window) and if there are no tiled windows then the label of the last focused floating window is used.

WorkspaceLabels off

WorkspaceLabels_off.jpg

WorkspaceLabels on

WorkspaceLabels_on.jpg

The client label is by default based on the window class, but this can be specified via client rules by including the .label option.


Configuration

/* The below are only used if the WorkspaceLabels functionality is enabled */
static char *occupied_workspace_label_format = "%s: %s";  /* format of a workspace label */
static char *vacant_workspace_label_format = "%s";        /* format of an empty / vacant workspace */
static int lowercase_workspace_labels = 1;                /* whether to change workspace labels to lower case */
static int prefer_window_icons_over_workspace_labels = 0; /* whether to use window icons instead of labels if present */
static int swap_occupied_workspace_label_format_strings = 0; /* 0 gives "icon: label", 1 gives "label: icon" */

The occupied_workspace_label_format and vacant_workspace_label_format options are used depending on whether there are clients labels to show or not.

For example if desired one could wrap the entire workspace text in square brackets, e.g. "[%s: %s]" and "[%s]".

When the workspace is empty (vacant) then the %s placeholder is replaced with the normal workspace icon.

The lowercase_workspace_labels setting will result in the client label to be changed to lower case. If disabled then the label may come through in title case.

When the workspace is occupied then the first %s placeholder is replaced with the normal workspace icon and the second %s placeholder is replaced with the client label.

If the swap_occupied_workspace_label_format_strings setting is enabled then it is the other way around, i.e. the client label comes first then the normal workspace icon.

The prefer_window_icons_over_workspace_labels setting, if enabled, allows for window icons to be used in favour of labels. This assumes that the WinTitleIcons functionality is enabled.

The label format supports status2d markup.


Example configuration

WorkspaceLabels on with window icons

WorkspaceLabels_on_window_icons.jpg

The above is achieved with the following settings:

static char *occupied_workspace_label_format = "%s%s";
static int prefer_window_icons_over_workspace_labels = 1;
static int swap_occupied_workspace_label_format_strings = 1;

in combination with using superscript characters for the occupied icons in the workspace rules (wsrules) array.

... ------ icons ------
... def,   vac,  occ,  */
... "1",   "",   "¹", },
... "2",   "",   "²", },
... "3",   "",   "³", },
... "4",   "",   "⁴", },
... "5",   "",   "⁵", },
... "6",   "",   "⁶", },
... "7",   "",   "⁷", },
... "8",   "",   "⁸", },
... "9",   "",   "⁹", },

Back to Functionality.

⚠️ **GitHub.com Fallback** ⚠️