Skip to content

keyboard-input

Active keyboard layout indicator.

Add it to your layout with keyboard-input:

toml
[[bar.layout]]
monitor = "*"
right = ["keyboard-input"]

General

FieldTypeDefaultDescription
formatstring"{{ alias }}"Format string for the label.
icon-namestring"ld-keyboard-symbolic"Symbolic icon name.
border-showboolfalseDisplay border around button.
icon-showbooltrueDisplay module icon.
label-showbooltrueDisplay text label.
label-max-lengthu320Max label characters before truncation with ellipsis. Set to 0 to disable.
layout-alias-mapmap of string{}Language name mapping.
More about format

Placeholders

  • {{ layout }} - Raw layout name from the compositor (e.g., "English (US)")
  • {{ alias }} - User-defined alias from layout-alias-map, falls back to {{ layout }}

Examples

  • "{{ layout }}" - "English (US)"
  • "{{ alias }}" - "EN" (with alias map configured)
More about layout-alias-map

Example

toml
[modules.keyboard-input.layout-alias-map]
"English (US)" = "EN"
"Czech (QWERTY)" = "Czech"

Colors

FieldTypeDefaultDescription
border-colorColorValue"yellow"Border color token.
icon-colorColorValue"auto"Icon foreground color. Auto selects based on variant for contrast.
icon-bg-colorColorValue"yellow"Icon container background color token.
label-colorColorValue"yellow"Label text color token.
button-bg-colorColorValue"bg-surface-elevated"Button background color token.

Click actions

FieldTypeDefaultDescription
left-clickClickAction""Action on left click.
right-clickClickAction""Action on right click.
middle-clickClickAction""Action on middle click.
scroll-upClickAction""Action on scroll up.
scroll-downClickAction""Action on scroll down.

Default configuration

toml
[modules.keyboard-input]
format = "{{ alias }}"
icon-name = "ld-keyboard-symbolic"
border-show = false
border-color = "yellow"
icon-show = true
icon-color = "auto"
icon-bg-color = "yellow"
label-show = true
label-color = "yellow"
label-max-length = 0
button-bg-color = "bg-surface-elevated"
left-click = ""
right-click = ""
middle-click = ""
scroll-up = ""
scroll-down = ""

[modules.keyboard-input.layout-alias-map]

Released under the MIT License.