fea(workspaces): add disable-scroll config
parent
e4f35d7ca0
commit
8768183f3d
|
@ -9,6 +9,7 @@
|
|||
"modules-right": ["pulseaudio", "network", "cpu", "memory", "battery", "clock"],
|
||||
// Modules configuration
|
||||
"sway/workspaces": {
|
||||
// "disable-scroll": true,
|
||||
// "all-outputs": true,
|
||||
// "format-icons": {
|
||||
// "1": "",
|
||||
|
|
|
@ -105,8 +105,10 @@ void waybar::modules::sway::Workspaces::addWorkspace(Json::Value node)
|
|||
}
|
||||
});
|
||||
button.add_events(Gdk::SCROLL_MASK | Gdk::SMOOTH_SCROLL_MASK);
|
||||
if (!config_["disable-scroll"].asBool()) {
|
||||
button.signal_scroll_event()
|
||||
.connect(sigc::mem_fun(*this, &Workspaces::handleScroll));
|
||||
}
|
||||
box_.reorder_child(button, node["num"].asInt());
|
||||
if (node["focused"].asBool()) {
|
||||
button.get_style_context()->add_class("focused");
|
||||
|
|
Loading…
Reference in New Issue