Bar - bakkeby/dusk GitHub Wiki

The built-in bar (or bars) in the window manager provides the user with information such as what workspace is being viewed, what layout is being used, titles of open windows, a systray and individual status areas as needed.

BarBorder.jpg

The built-in bar is highly configurable:

  • the number of bars as well as their size and positions are defined on a per monitor basis
  • the content of each bar is made up of bar modules that can be more or less freely placed
  • most modules are subject to customisation and
  • mouse click handling is supported for all modules

By default each monitor has a top bar and a bottom bar and they take up the full width of the monitor.

Size and position

If you are looking to experiment with smaller separate bars then refer to the Bar Placement page which outlines how to change the size and position of the bar.

Bar modules

The content of the bar is controlled by individual modules that handles drawing of content and button clicks in isolation.

Refer to the Bar Modules page for more details of how the modules work should you be interested in creating custom modules.

For now it is enough to know that there are five main modules of interest:

  • workspaces - shows workspace icons on the bar
  • systray - positions the systray on the bar
  • ltsymbol - indicates the current layout used using symbols
  • flexwintitle - draws window titles on the bar
  • status - shows user defined text on the bar

Bar indicators

Additional graphics can be used to highlight different states for workspaces or window titles.

For example whether a workspace is occupied by clients or is pinned, or a small symbol indicating that a window is floating.

Refer to the Bar Indicators page for more information.

Bar Rules

Which modules that are included on a bar and their positions are determined by the barrules setting in config.h.

Refer to the Bar Rules page for details on how this configuration works.

Button bindings

There are some click types that are specific to individual bar modules.

These are:

  • ClkLtSymbol - clicks on the layout symbol
  • ClkStatusText - clicks on status modules
  • ClkWinTitle - clicks on window titles in the bar
  • ClkWorkspaceBar - clicks on workspace icons

Refer to the Button Bindings page for details on general set up.

Functions

Here is a list of functions that are related to the bar.

Function Description
focuswin Allows focusing on clients by left-clicking window titles in the bar
hidebar Combines with showbar to hide the bar when a key combination is released
setstatus Used externally to set custom statuses
showbar Combines with hidebar to temporarily show a bar while a key combination is held down
statusclick Handles button clicks for statuses on the bar
togglebar Toggles the display of the bar on and off for the current monitor
togglebarpadding Helper function to toggle the bar padding on and off
togglecompact Helper function to toggle compact view on and off

Functionality

Here is a list of functionality that are related to the bar itself or individual bar modules.

Functionality Description
AltWindowTitles Show alternative window titles for clients, if present
AltWorkspaceIcons Show workspace names instead of icons
BarActiveGroupBorderColor Use border color of the active window group for the bar
BarMasterGroupBorderColor Use border color of the master window group for the bar
BarBorder Draw a border around the bar
BarPadding Enables bar padding (adds space between the monitor edge and bar)
CenteredWindowName Center the window name in the bar
ColorEmoji Enables color emoji support (removes Xft workaround)
FlexWinBorders Use the SchemeFlex* color schemes, falls back to SchemeTitle* if disabled
Status2DNoAlpha Option to not use alpha when drawing status2d text
Systray Enables a systray in the bar
WinTitleIcons Enables icons next to window titles in the bar
StackerIcons Adds stacker keyboard shortcut hints next to window titles in the bar
WorkspaceLabels Adds the class of the primary client next to the workspace icon in the bar
WorkspacePreview Enables preview images to be shown when hovering workspace icons in the bar that has clients

Back to Features.

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