1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-08-17 23:01:04 +02:00
ironbar/docs/modules/Keys.md
Jake Stanger ccfe73f6a7
feat: libinput keys module
Adds a new module which shows the status of toggle mod keys (capslock, num lock, scroll lock).

Resolves #700
2024-12-27 19:44:25 +00:00

3.2 KiB

Note

This module requires your user is in the input group.

Displays the toggle state of the capslock, num lock and scroll lock keys.

Screenshot of clock widget with popup open

Configuration

Type: keys

Name Type Default Description
show_caps boolean true Whether to show capslock indicator.
show_num boolean true Whether to show num lock indicator.
show_scroll boolean true Whether to show scroll lock indicator.
icon_size integer 32 Size to render icon at (image icons only).
icons.caps_on string or image 󰪛 Icon to show for enabled capslock indicator.
icons.caps_off string or image '' Icon to show for disabled capslock indicator.
icons.num_on string or image Icon to show for enabled num lock indicator.
icons.num_off string or image '' Icon to show for disabled num lock indicator.
icons.scroll_on string or image Icon to show for enabled scroll lock indicator.
icons.scroll_off string or image '' Icon to show for disabled scroll lock indicator.
seat string seat0 ID of the Wayland seat to attach to.
JSON
{
  "end": [
    {
      "type": "keys",
      "show_scroll": false,
      "icons": {
        "caps_on": "󰪛"
      }
    }
  ]
}
TOML
[[end]]
type = "keys"
show_scroll = false

[end.icons]
caps_on = "󰪛"
YAML
end:
  - type: keys
    show_scroll: false
    icons:
      caps_on: 󰪛
Corn
{
end = [ 
        { 
            type = "keys" 
            show_scroll = false 
            icons.caps_on = "󰪛" 
        }
    ]
}

Styling

Selector Description
.keys Keys box container widget.
.keys .key Individual key indicator container widget.
.keys .key.enabled Key indicator where key is toggled on.
.keys .key.caps Capslock key indicator.
.keys .key.num Num lock key indicator.
.keys .key.scroll Scroll lock key indicator.
.keys .key.image Key indicator image icon.
.keys .key.text-icon Key indicator textual icon.

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