.\" Generated by scdoc 1.11.3 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "waybar-keyboard-state" "5" "2024-09-15" .PP .SH NAME .PP waybar - keyboard-state module .PP .SH DESCRIPTION .PP The \fBkeyboard-state\fR module displays the state of number lock, caps lock, and scroll lock.\& .PP You must be a member of the input group to use this module.\& .PP .SH CONFIGURATION .PP \fBinterval\fR: .br Deprecated, this module uses event loop now, the interval has no effect.\& .RS 4 typeof: integer .br default: 1 .br The interval, in seconds, to poll the keyboard state.\& .PP .RE \fBformat\fR: .br typeof: string|object .br default: {name} {icon} .br The format, how information should be displayed.\& If a string, the same format is used for all keyboard states.\& If an object, the fields "numlock", "capslock", and "scrolllock" each specify the format for the corresponding state.\& Any unspecified states use the default format.\& .PP \fBformat-icons\fR: .br typeof: object .br default: {"locked": "locked", "unlocked": "unlocked"} .br Based on the keyboard state, the corresponding icon gets selected.\& The same set of icons is used for number, caps, and scroll lock, but the icon is selected from the set independently for each.\& See \fBicons\fR.\& .PP \fBnumlock\fR: .br typeof: bool .br default: false .br Display the number lock state.\& .PP \fBcapslock\fR: .br typeof: bool .br default: false .br Display the caps lock state.\& .PP \fBscrolllock\fR: .br typeof: bool .br default: false .br Display the scroll lock state.\& .PP \fBdevice-path\fR: .br typeof: string .br default: chooses first valid input device .br Which libevdev input device to show the state of.\& Libevdev devices can be found in /dev/input.\& The device should support number lock, caps lock, and scroll lock events.\& .PP \fBbinding-keys\fR: .br typeof: array .br default: [58, 69, 70] .br Customize the key to trigger this module, the key number can be found in /usr/include/linux/input-event-codes.\&h or running sudo libinput debug-events --show-keycodes.\& .PP .SH FORMAT REPLACEMENTS .PP \fB{name}\fR: Caps, Num, or Scroll.\& .PP \fB{icon}\fR: Icon, as defined in \fBformat-icons\fR.\& .PP .SH ICONS .PP The following \fBformat-icons\fR can be set.\& .PP .PD 0 .IP \(bu 4 \fBlocked\fR: Will be shown when the keyboard state is locked.\& Default "locked".\& .IP \(bu 4 \fBunlocked\fR: Will be shown when the keyboard state is not locked.\& Default "unlocked" .PD .PP .SH EXAMPLE: .PP .nf .RS 4 "keyboard-state": { "numlock": true, "capslock": true, "format": "{name} {icon}", "format-icons": { "locked": "", "unlocked": "" } } .fi .RE .PP .SH STYLE .PP .PD 0 .IP \(bu 4 \fB#keyboard-state\fR .IP \(bu 4 \fB#keyboard-state label\fR .IP \(bu 4 \fB#keyboard-state label.\&locked\fR .IP \(bu 4 \fB#keyboard-state label.\&numlock\fR .IP \(bu 4 \fB#keyboard-state label.\&numlock.\&locked\fR .IP \(bu 4 \fB#keyboard-state label.\&capslock\fR .IP \(bu 4 \fB#keyboard-state label.\&capslock.\&locked\fR .IP \(bu 4 \fB#keyboard-state label.\&scrolllock\fR .IP \(bu 4 \fB#keyboard-state label.\&scrolllock.\&locked\fR