Skip to content

Bars, popouts, and drawers

Bar widgets and popouts use the same widget package. render(ctx) supplies the bar slot; popout(ctx) supplies its panel. A drawer combines several widgets’ popouts at a display edge. Start with Build your first widget or Build a menu to create one.

leading, center and trailing are the bar’s three groups, in order; widgets in a split bar’s active island come from leading and center. With Full Width on, the bar spans the screen edge and the groups sit at its start, center and end; Notch Mode then picks where center goes on a notched display.

When a full-width bar is too crowded, widgets never draw over each other, nor under the notch when Notch Mode places center beside it. The gaps between widgets tighten first. priority lists widgets from most to least important, and the least important widget on the crowded side then gives way. On a horizontal bar, a widget whose root row scrolls, such as the bundled workspaces, keeps the room that is left and scrolls inside it: its clipped edge fades and it keeps the focused workspace in view. A plain row of items drops whole items, keeping its start, or its end in trailing. A widget with a marquee outside trailing is shortened to the room that is left. Any other widget is hidden. On a vertical bar the widget that gives way is cut by just the amount that doesn’t fit, keeping its start, or its end in trailing, and is hidden when even that isn’t enough. Widgets missing from the list rank after it, from the outer edges inward, then center.

An enabled full-width bar requests macOS menu-bar auto-hide only at Overlapping Menu Bar; Below Menu Bar, Bottom, Left and Right leave the preference alone. Moving the last requesting bar to another position, disabling it or quitting OmniWM normally restores the previous preference if it still matches the value OmniWM applied. Another display’s full-width bar over the menu bar can keep automatic hiding active because the preference is system-wide. See Full Width for manual hiding and crash recovery. At overlapping top placement, the bar stays above the native menu bar. The themed presets reserve their occupied space for tiled windows; Reserve Space for Workspace Bar controls this, and an automatically hidden workspace bar does not reserve space.

Settings > Styles & Widgets > Bar edits them for the selected style: drag to reorder, select Add Widget… to choose a group, and select a widget for its options or Remove from Bar. Under Priority, drag widgets into the order they keep their place on a crowded bar. Use Style Layout… restores all three groups and the style’s priority together. Right-click a widget on the bar to move it, take it off the bar or open these settings; when the widget uses right-click itself, Option + right-click opens the same menu. Your own widgets in widgets/ are listed there to add.

-- In ~/.config/omniwm/shell/shell.luau, for the default profile:
return {
profiles = {
default = {
leading = { "omniwm", "workspaces", "scratchpads" },
center = { "clock" },
trailing = { "volume", "system-stats" },
priority = { "workspaces", "clock", "volume", "omniwm", "system-stats" },
},
},
}

Use the active profile’s name instead of default. In that profile folder’s own shell.luau, omit profiles.<name>.. Profile settings and precedence are explained in Profiles and palettes.

A component package can expose a bar button by listing "bar" in component.manifest.luau’s views and implementing views.bar(ctx) in component.luau. Place its folder name in leading, center or trailing, or choose it in Add Widget. For example, trailing = { "vpn", "tmux" } hosts one instance of each component alongside any configured island root. Each instance uses its folder name as its id and uses the manifest’s option defaults. An existing widget entry point (init.luau) takes precedence for the same name.

All displays share the component instance and its optional provider. Removing the component from the lanes or disabling the last workspace bar retires the instance and stops its provider. Adding it back uses the existing approval for the same program.

Add Widget… also offers launcher, active-window, input-source, wifi, wifi-networks, bluetooth, battery-details, world-clock, privacy and control-center. wifi-networks is wifi with a list of nearby networks in its popout: click a Known Network or an open network to join it. Long lists scroll. Unsaved secured and enterprise networks, and any network OmniWM cannot join directly, open Wi-Fi Settings, where OmniWM uses Accessibility to select the exact network and start Apple’s join flow. It only does so when the row’s security in Settings matches the network you clicked. Any password or identity is entered only in macOS; OmniWM does not read credential fields. If the network cannot be selected safely within eight seconds, Settings stays open for a manual join and the widget reports the failed handoff. The handoff continues if its popout closes.

With Transparent Background and Show Item Backgrounds both on, the default widgets draw their own capsules and palette popouts.

Select a widget to change supported choices visually. Options follow the actual widget implementation in the selected style; a style that does not use an option does not show it. World Clock provides a location list, and Weather provides city or coordinates, units, and refresh interval. The default widgets also read these values from profiles.<profile>.widgets.<name> in shell.luau:

Widget Settings
workspaces indicator: "pills", "underline", "dots", "numbers" or "minimal"
stats variant: "meters", "gauge" or "graph"
world-clock zones: a list of { label = "Tokyo", zone = "Asia/Tokyo" }; bar: how many to show on the bar
launcher mode: a command palette mode such as "windows"; symbol: an SF Symbol
active-window display: "icon_and_text", "icon_only" or "text_only"; maxWidth
battery-details percent: "beside", "inside" or "off"
control-center tab: "overview", "audio", "displays", "media", "calendar", "weather" or "system"

The Control Center’s Displays tab adjusts brightness for each display where macOS exposes that control, toggles Night Shift when available, and links to Displays in System Settings.

hiddenBarWidget and systemStatsWidget name the widgets that draw the Hidden Bar drawer and the System Stats popout. The profile supplies defaults; GUI changes are saved as that profile’s overrides. Workspace Bar’s master enable switch, excluded apps and icon overrides stay global. Enabling System Stats Button also places the configured stats widget on the bar if it was removed.

For your own widgets, place settings.luau beside the effective init.luau to declare Options controls. Values arrive in ctx.data.settings. See the widget tutorial and settings schema reference.

An element with onClick = ui.popout opens its widget’s popout(ctx). You can also use popout = true, or run omniwmctl shell toggle <widget>. On the focused display, the panel opens beneath the bar slot; a widget with no visible slot uses the top-right edge. Only one popout or drawer is open at a time.

Use stable element keys for interactive controls. The UI elements and input reference describe callbacks and native controls. The menu tutorial builds a popout with action rows and a submenu.

Configure drawers under Settings > Styles & Widgets > Drawers: add a drawer, choose its edge and widgets, arrange them, and adjust hover, close, hover area, and background behavior. Configure Shortcut… opens the registered Toggle action; enable the bar or island first if the drawer has not been loaded.

A drawer.<id> stacks the popouts of its widgets in one panel on a screen edge, like a control center. Open it with shell toggle <id>, from a click, with Settings > Keyboard Shortcuts > Toggle <id>, or by moving the pointer to that edge when hover = true. Only one drawer or popout is open at a time. width = 900 limits the hover to that stretch of the edge’s middle, and reach = 10 lets the pointer open it from up to 10 points away from the edge. close = "leave" closes it as soon as the pointer leaves it; opened by a click or hotkey, it stays until the pointer has been inside and left. chrome = false drops the panel’s own background, padding and slide, so the widget draws the whole panel flush against the edge, beside the bar, with room to overshoot.

-- In ~/.config/omniwm/shell/shell.luau:
return {
profiles = {
default = {
drawer = {
controls = {
edge = "right",
widgets = { "volume", "media", "calendar" },
hover = true,
},
},
},
},
}

In a profile folder’s shell.luau, use drawer.controls. A drawer widget supplies popout(ctx), so the same custom menu can run as a bar popout and inside a drawer without a second implementation. Use distinct drawer and widget names: shell toggle resolves a matching drawer first.

present = "island" hands the drawer to the island root instead of opening a panel, so the island can draw it in its own glass and let its pieces melt into it. It opens and closes on the same hover, toggle, shortcut and close rules. While it is open, ctx.data.island.drawer holds its id on that display, and widgets may be left out. With close = "leave", it stays open while the pointer is over the island’s own content and closes after the pointer leaves both the island and the edge, never while a button is held.

Hidden Bar app menus use the hidden-bar-menu widget, which opens beneath the clicked icon while the icon strip stays visible. Its ctx.data.hiddenBar.menu contains the current menu’s title, optional backID, and rows with id, title, enabled, mark, shortcut, submenu, and separator. The widget sends hidden-bar-menu <id> to enter a submenu, go back, or execute a command. IDs are valid only for the displayed page. OmniWM temporarily exposes the selected native status item while acquiring and using its menu, then conceals it again when the menu ends. Like other widgets, its appearance can be customized in the selected profile’s widgets/hidden-bar-menu/init.luau.

ctx.data.hiddenBar.items stays current while the drawer is closed, so a bar widget can put hidden apps inline, beside the system controls:

-- In ~/.config/omniwm/shell/widgets/menu-extras/init.luau:
function render(ctx: Context)
local row = { gap = 2 }
for _, item in ipairs(ctx.data.hiddenBar.items) do
row[#row + 1] = ui.stack{ key = item.id, w = math.ceil(item.w) + 8, h = 22, help = item.name,
onClick = "hidden-bar activate " .. item.id,
if item.image then ui.image{ image = item.image, w = item.w, h = item.h }
else ui.symbol{ name = "app.dashed", w = 16, h = 16 } }
end
return ui.row(row)
end

See Hidden Bar for concealment setup and Full Disk Access requirements, and the context and data reference for menu field types.