diff --git a/man/waybar-keyboard-state.5.scd b/man/waybar-keyboard-state.5.scd index 8e9ca5eb..1d7c3a83 100644 --- a/man/waybar-keyboard-state.5.scd +++ b/man/waybar-keyboard-state.5.scd @@ -2,11 +2,11 @@ waybar-keyboard-state(5) # NAME -waybar - keyboard_state module +waybar - keyboard-state module # DESCRIPTION -The *keyboard_state* module displays the state of number lock, caps lock, and scroll lock. +The *keyboard-state* module displays the state of number lock, caps lock, and scroll lock. # CONFIGURATION @@ -61,7 +61,7 @@ The following *format-icons* can be set. # EXAMPLE: ``` -"keyboard_state": { +"keyboard-state": { "numlock": true, "capslock": true, "format": "{name} {icon}", @@ -74,7 +74,7 @@ The following *format-icons* can be set. # STYLE -- *#keyboard_state* -- *#keyboard_state label* -- *#keyboard_state label.locked* +- *#keyboard-state* +- *#keyboard-state label* +- *#keyboard-state label.locked* diff --git a/resources/config b/resources/config index 465f6949..87f24c04 100644 --- a/resources/config +++ b/resources/config @@ -6,7 +6,7 @@ // Choose the order of the modules "modules-left": ["sway/workspaces", "sway/mode", "custom/media"], "modules-center": ["sway/window"], - "modules-right": ["mpd", "idle_inhibitor", "pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "keyboard_state", "sway/language", "battery", "battery#bat2", "clock", "tray"], + "modules-right": ["mpd", "idle_inhibitor", "pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "keyboard-state", "sway/language", "battery", "battery#bat2", "clock", "tray"], // Modules configuration // "sway/workspaces": { // "disable-scroll": true, @@ -23,7 +23,7 @@ // "default": "" // } // }, - "keyboard_state": { + "keyboard-state": { "numlock": true, "capslock": true, "format": "{name} {icon}", diff --git a/resources/style.css b/resources/style.css index c1ac5ad1..b585e5f1 100644 --- a/resources/style.css +++ b/resources/style.css @@ -229,7 +229,7 @@ label:focus { min-width: 16px; } -#keyboard_state { +#keyboard-state { background: #97e1ad; color: #000000; padding: 0 0px; @@ -237,10 +237,10 @@ label:focus { min-width: 16px; } -#keyboard_state > label { +#keyboard-state > label { padding: 0 5px; } -#keyboard_state > label.locked { +#keyboard-state > label.locked { background: rgba(0, 0, 0, 0.2); } diff --git a/src/factory.cpp b/src/factory.cpp index 6a0147d9..98363545 100644 --- a/src/factory.cpp +++ b/src/factory.cpp @@ -71,7 +71,7 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name) const { } #endif #ifdef HAVE_LIBEVDEV - if (ref == "keyboard_state") { + if (ref == "keyboard-state") { return new waybar::modules::KeyboardState(id, bar_, config_[name]); } #endif diff --git a/src/modules/keyboard_state.cpp b/src/modules/keyboard_state.cpp index ca72144a..2b6eb2d9 100644 --- a/src/modules/keyboard_state.cpp +++ b/src/modules/keyboard_state.cpp @@ -9,7 +9,7 @@ extern "C" { } waybar::modules::KeyboardState::KeyboardState(const std::string& id, const Bar& bar, const Json::Value& config) - : AModule(config, "keyboard_state", id, false, !config["disable-scroll"].asBool()), + : AModule(config, "keyboard-state", id, false, !config["disable-scroll"].asBool()), box_(bar.vertical ? Gtk::ORIENTATION_VERTICAL : Gtk::ORIENTATION_HORIZONTAL, 0), numlock_label_(""), capslock_label_(""), @@ -31,7 +31,7 @@ waybar::modules::KeyboardState::KeyboardState(const std::string& id, const Bar& : "unlocked"), fd_(0), dev_(nullptr) { - box_.set_name("keyboard_state"); + box_.set_name("keyboard-state"); if (config_["numlock"].asBool()) { box_.pack_end(numlock_label_, false, false, 0); }