Skip to content

Focused

Displays the title and/or icon of the currently focused window.

Screenshot of focused widget, showing an Ironbar file currently open in RustRover

Example

{
end = [
{
type = "focused"
show_icon = true
show_title = true
icon_size = 32
truncate = "end"
}
]
}

Configuration

Type: focused

Icon size in pixels.

Type: integer
Default: 32

The justification (alignment) of the widget text shown on the bar.

Type: 'left' | 'right' | 'center' | 'fill'
Default: 'left'

The orientation to display the widget contents. Setting to vertical will rotate text 90 degrees.

Type: 'horizontal' | 'vertical'
Default: 'horizontal'

Whether to show icon on the bar.

Type: boolean
Default: true

Whether to show app name on the bar.

Type: boolean
Default: true

See truncate options.

Default: None

Do not truncate content.

Setting this option may cause excessively long content to overflow other widgets, shifting them off-screen.

{ truncate = "off" }

Auto mode lets GTK decide when to ellipsize.

To use this mode, set the truncate option to a string declaring the location to truncate text from and place the ellipsis.

{ truncate = "start" }

Length mode defines a fixed point at which to ellipsize.

Generally you will want to set only one of length or max_length, but you can set both if required.

{
truncate.mode = "start"
truncate.length = 50
truncate.max_length = 70
}
Object keys

The fixed width (in characters) of the widget.

The widget will be expanded to this width if it would have otherwise been smaller.

Leave unset to let GTK automatically handle.

Type: integer
Default: None

The maximum number of characters to show before truncating.

Leave unset to let GTK automatically handle.

Type: integer
Default: None

The location to truncate text from and place the ellipsis.

Type: 'none' | 'start' | 'middle' | 'end'
Default: None

Styling

SelectorDescription
.focusedFocused widget box
.focused .iconApp icon
.focused .labelApp name

For more information on styling, please see the styling guide.