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