1waybar-keyboard-state(5) File Formats Manual waybar-keyboard-state(5)
2
3
4
6 waybar - keyboard-state module
7
9 The keyboard-state module displays the state of number lock, caps lock,
10 and scroll lock.
11
13 interval:
14 typeof: integer
15 default: 1
16 The interval, in seconds, to poll the keyboard state.
17
18 format:
19 typeof: string|object
20 default: {name} {icon}
21 The format, how information should be displayed. If a string, the
22 same format is used for all keyboard states. If an object, the fields
23 "numlock", "capslock", and "scrolllock" each specify the format for the
24 corresponding state. Any unspecified states use the default format.
25
26 format-icons:
27 typeof: object
28 default: {"locked": "locked", "unlocked": "unlocked"}
29 Based on the keyboard state, the corresponding icon gets selected.
30 The same set of icons is used for number, caps, and scroll lock, but
31 the icon is selected from the set independently for each. See icons.
32
33 numlock:
34 typeof: bool
35 default: false
36 Display the number lock state.
37
38 capslock:
39 typeof: bool
40 default: false
41 Display the caps lock state.
42
43 scrolllock:
44 typeof: bool
45 default: false
46 Display the scroll lock state.
47
48 device-path:
49 typeof: string
50 default: chooses first valid input device
51 Which libevdev input device to show the state of. Libevdev devices
52 can be found in /dev/input. The device should support number lock, caps
53 lock, and scroll lock events.
54
56 {name}: Caps, Num, or Scroll.
57
58 {icon}: Icon, as defined in format-icons.
59
61 The following format-icons can be set.
62
63 • locked: Will be shown when the keyboard state is locked. Default
64 "locked".
65 • unlocked: Will be shown when the keyboard state is not locked. De‐
66 fault "unlocked"
67
68
70 "keyboard-state": {
71 "numlock": true,
72 "capslock": true,
73 "format": "{name} {icon}",
74 "format-icons": {
75 "locked": "",
76 "unlocked": ""
77 }
78 }
79
81 • #keyboard-state
82 • #keyboard-state label
83 • #keyboard-state label.locked
84
85
86 2021-11-02 waybar-keyboard-state(5)