1waybar-keyboard-state(5)      File Formats Manual     waybar-keyboard-state(5)
2
3
4

NAME

6       waybar - keyboard-state module
7

DESCRIPTION

9       The keyboard-state module displays the state of number lock, caps lock,
10       and scroll lock.
11
12       You must be a member of the input group to use this module.
13

CONFIGURATION

15       interval:
16            Deprecated, this module uses event loop now, the interval has no
17       effect.
18           typeof: integer
19                default: 1
20                The interval, in seconds, to poll the keyboard state.
21
22       format:
23            typeof: string|object
24            default: {name} {icon}
25            The format, how information should be displayed. If a string, the
26       same format is used for all keyboard states. If an object, the fields
27       "numlock", "capslock", and "scrolllock" each specify the format for the
28       corresponding state. Any unspecified states use the default format.
29
30       format-icons:
31            typeof: object
32            default: {"locked": "locked", "unlocked": "unlocked"}
33            Based on the keyboard state, the corresponding icon gets selected.
34       The same set of icons is used for number, caps, and scroll lock, but
35       the icon is selected from the set independently for each. See icons.
36
37       numlock:
38            typeof: bool
39            default: false
40            Display the number lock state.
41
42       capslock:
43            typeof: bool
44            default: false
45            Display the caps lock state.
46
47       scrolllock:
48            typeof: bool
49            default: false
50            Display the scroll lock state.
51
52       device-path:
53            typeof: string
54            default: chooses first valid input device
55            Which libevdev input device to show the state of. Libevdev devices
56       can be found in /dev/input. The device should support number lock, caps
57       lock, and scroll lock events.
58
59       binding-keys:
60            typeof: array
61            default: [58, 69, 70]
62            Customize the key to trigger this module, the key number can be
63       found in /usr/include/linux/input-event-codes.h or running sudo libin‐
64       put debug-events --show-keycodes.
65

FORMAT REPLACEMENTS

67       {name}: Caps, Num, or Scroll.
68
69       {icon}: Icon, as defined in format-icons.
70

ICONS

72       The following format-icons can be set.
73
74locked: Will be shown when the keyboard state is locked. Default
75           "locked".
76unlocked: Will be shown when the keyboard state is not locked. De‐
77           fault "unlocked"
78
79

EXAMPLE:

81           "keyboard-state": {
82                "numlock": true,
83                "capslock": true,
84                "format": "{name} {icon}",
85                "format-icons": {
86                     "locked": "",
87                     "unlocked": ""
88                }
89           }
90

STYLE

92#keyboard-state
93#keyboard-state label
94#keyboard-state label.locked
95#keyboard-state label.numlock
96#keyboard-state label.numlock.locked
97#keyboard-state label.capslock
98#keyboard-state label.capslock.locked
99#keyboard-state label.scrolllock
100#keyboard-state label.scrolllock.locked
101
102
103
104                                  2023-11-05          waybar-keyboard-state(5)
Impressum