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 Deprecated, this module use 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
60 {name}: Caps, Num, or Scroll.
61
62 {icon}: Icon, as defined in format-icons.
63
65 The following format-icons can be set.
66
67 • locked: Will be shown when the keyboard state is locked. Default
68 "locked".
69 • unlocked: Will be shown when the keyboard state is not locked. De‐
70 fault "unlocked"
71
72
74 "keyboard-state": {
75 "numlock": true,
76 "capslock": true,
77 "format": "{name} {icon}",
78 "format-icons": {
79 "locked": "",
80 "unlocked": ""
81 }
82 }
83
85 • #keyboard-state
86 • #keyboard-state label
87 • #keyboard-state label.locked
88 • #keyboard-state label.numlock
89 • #keyboard-state label.numlock.locked
90 • #keyboard-state label.capslock
91 • #keyboard-state label.capslock.locked
92 • #keyboard-state label.scrolllock
93 • #keyboard-state label.scrolllock.locked
94
95
96
97 2023-08-16 waybar-keyboard-state(5)