Page:
Module: Keyboard State
Pages
Abrar's Waybar
Add a custom plugin.
Anik's waybar config (super waybar)
Ariacna Æsama
Arkboi
Chocolate & Cream
Configuration
Dynamic wallust powered waybar
ERS’ waybar
Examples
FAQ
Home
Installation
JohanChane's waybar
Module: Backlight Slider
Module: Backlight
Module: Battery
Module: Bluetooth
Module: CFFI
Module: CPU
Module: Cava
Module: Cava: GLSL
Module: Cava: Raw
Module: Clock
Module: Custom
Module: Custom: Examples
Module: Custom: Menu
Module: Custom: Third party
Module: Disk
Module: Dwl
Module: Gamemode
Module: Group
Module: Hyprland
Module: Idle Inhibitor
Module: Image
Module: JACK
Module: Keyboard State
Module: Language
Module: Load
Module: MPD
Module: MPRIS
Module: Memory
Module: Network
Module: Niri
Module: PowerProfilesDaemon
Module: Privacy
Module: PulseAudio Slider
Module: PulseAudio
Module: River
Module: Sndio
Module: Sway
Module: Systemd failed units
Module: Taskbar
Module: Temperature
Module: Tray
Module: UPower
Module: User
Module: WirePlumber
Module: Workspaces
Modules
Simple and Attractive
States
Styling
That's all bitches
Themes
Thos' config based on pywal
Tray Applets
Writing Modules
apachaiz's waybar
d00m1k's configuration
lingllqs's simple dark style configuration
mechabar
mudi4's waybar
new waylyrics
nitrobigchill's waybar
rdk‐codes configuration
waybar config
Clone
Table of Contents
The keyboard-state module displays the state of number lock, caps lock, and scroll lock.
You must be a member of the input group to use this module (run usermod -a -G input [username] as root, then reboot).
Config
Addressed by keyboard-state
| option | typeof | default | description |
|---|---|---|---|
interval |
integer | 1 |
Deprecated, this module uses event loop now, the interval has no effect. The interval, in seconds, to poll the keyboard state. |
format |
string/object | "{name} {icon}" |
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. |
format-icons |
object | {"locked": "locked", "unlocked": "unlocked"} |
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 icons. |
numlock |
bool | false |
Display the number lock state. |
capslock |
bool | false |
Display the caps lock state. |
scrolllock |
bool | false |
Display the scroll lock state. |
device-path |
string | chooses first valid input device | 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. |
binding-keys |
array | [58, 69, 70] | Customize the key to trigger this module, the key number can be find in /usr/include/linux/input-event-codes.h or running sudo libinput debug-events --show-keycodes. |
Format replacements
| string | replacement |
|---|---|
{name} |
Caps, Num, or Scroll. |
{icon} |
Icon, as defined in format-icons. |
Name replacements example
"keyboard-state": {
"numlock": true,
"capslock": true,
"format": {
"numlock": "N {icon}",
"capslock": "C {icon}"
},
"format-icons": {
"locked": "",
"unlocked": ""
}
}
Icons
The following format-icons can be set.
| string | note |
|---|---|
| locked | Will be shown when the keyboard state is locked. Default "locked". |
| unlocked | Will be shown when the keyboard state is not locked. Default "unlocked". |
Example
"keyboard-state": {
"numlock": true,
"capslock": true,
"format": "{name} {icon}",
"format-icons": {
"locked": "",
"unlocked": ""
}
}
Style
#keyboard-state#keyboard-state label#keyboard-state label.locked
- Home
- Installation
- Configuration
- Styling
- Examples
- FAQ
- Modules:
- Backlight/Slider
- Backlight
- Battery
- Bluetooth
- CPU
- Cava
- CFFI
- Clock
- Custom
- DWL
- Disk
- Gamemode
- Group
- Hyprland
- Idle Inhibitor
- Image
- JACK
- Keyboard State
- Language
- Load
- MPD
- MPRIS
- Memory
- Network
- Niri
- Power Profiles Daemon
- Privacy
- PulseAudio/Slider
- PulseAudio
- River
- Sndio
- Sway
- Systemd failed units
- Taskbar
- Temperature
- Tray
- UPower
- User
- WirePlumber
- Workspaces
- Writing Modules