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