mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
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 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
Block a user