From 99138ffdcd6e3620a9952d7ca1ceb7b0fc5edfb1 Mon Sep 17 00:00:00 2001 From: Grant Moyer Date: Thu, 15 Apr 2021 17:41:15 -0400 Subject: [PATCH] Add man page for keyboard_state module --- man/waybar-keyboard-state.5.scd | 80 +++++++++++++++++++++++++++++++++ man/waybar.5.scd.in | 1 + meson.build | 1 + 3 files changed, 82 insertions(+) create mode 100644 man/waybar-keyboard-state.5.scd diff --git a/man/waybar-keyboard-state.5.scd b/man/waybar-keyboard-state.5.scd new file mode 100644 index 0000000..8e9ca5e --- /dev/null +++ b/man/waybar-keyboard-state.5.scd @@ -0,0 +1,80 @@ +waybar-keyboard-state(5) + +# NAME + +waybar - keyboard_state module + +# DESCRIPTION + +The *keyboard_state* module displays the state of number lock, caps lock, and scroll lock. + +# CONFIGURATION + +*interval*: ++ + typeof: integer ++ + default: 1 ++ + The interval, in seconds, to poll the keyboard state. + +*format*: ++ + typeof: string|object ++ + default: {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*: ++ + typeof: object ++ + default: {"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*: ++ + typeof: bool ++ + default: false ++ + Display the number lock state. + +*capslock*: ++ + typeof: bool ++ + default: false ++ + Display the caps lock state. + +*scrolllock*: ++ + typeof: bool ++ + default: false ++ + Display the scroll lock state. + +*device-path*: ++ + typeof: string ++ + default: 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. + +# FORMAT REPLACEMENTS + +*{name}*: Caps, Num, or Scroll. + +*{icon}*: Icon, as defined in *format-icons*. + +# ICONS + +The following *format-icons* can be set. + +- *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* + diff --git a/man/waybar.5.scd.in b/man/waybar.5.scd.in index 0168de3..9dc6925 100644 --- a/man/waybar.5.scd.in +++ b/man/waybar.5.scd.in @@ -208,6 +208,7 @@ Valid options for the "rotate" property are: 0, 90, 180 and 270. - *waybar-custom(5)* - *waybar-disk(5)* - *waybar-idle-inhibitor(5)* +- *waybar-keyboard-state(5)* - *waybar-memory(5)* - *waybar-mpd(5)* - *waybar-network(5)* diff --git a/meson.build b/meson.build index 7ac6fd6..f3b50f7 100644 --- a/meson.build +++ b/meson.build @@ -317,6 +317,7 @@ if scdoc.found() 'waybar-custom.5.scd', 'waybar-disk.5.scd', 'waybar-idle-inhibitor.5.scd', + 'waybar-keyboard-state.5.scd', 'waybar-memory.5.scd', 'waybar-mpd.5.scd', 'waybar-network.5.scd',