fix: lint
This commit is contained in:
@ -12,8 +12,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "ipc.hpp"
|
#include "ipc.hpp"
|
||||||
#include "util/sleeper_thread.hpp"
|
|
||||||
#include "util/SafeSignal.hpp"
|
#include "util/SafeSignal.hpp"
|
||||||
|
#include "util/sleeper_thread.hpp"
|
||||||
|
|
||||||
namespace waybar::modules::sway {
|
namespace waybar::modules::sway {
|
||||||
|
|
||||||
|
|||||||
@ -139,7 +139,8 @@ void waybar::modules::Battery::refreshBatteries() {
|
|||||||
auto event_path = (node.path() / "uevent");
|
auto event_path = (node.path() / "uevent");
|
||||||
auto wd = inotify_add_watch(battery_watch_fd_, event_path.c_str(), IN_ACCESS);
|
auto wd = inotify_add_watch(battery_watch_fd_, event_path.c_str(), IN_ACCESS);
|
||||||
if (wd < 0) {
|
if (wd < 0) {
|
||||||
spdlog::warn("Could not watch events for {} (device may have been removed)", node.path().string());
|
spdlog::warn("Could not watch events for {} (device may have been removed)",
|
||||||
|
node.path().string());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
batteries_[node.path()] = wd;
|
batteries_[node.path()] = wd;
|
||||||
|
|||||||
@ -45,7 +45,7 @@ void Workspaces::init() {
|
|||||||
initializeWorkspaces();
|
initializeWorkspaces();
|
||||||
|
|
||||||
if (barScroll()) {
|
if (barScroll()) {
|
||||||
auto &window = const_cast<Bar &>(m_bar).window;
|
auto& window = const_cast<Bar&>(m_bar).window;
|
||||||
window.add_events(Gdk::SCROLL_MASK | Gdk::SMOOTH_SCROLL_MASK);
|
window.add_events(Gdk::SCROLL_MASK | Gdk::SMOOTH_SCROLL_MASK);
|
||||||
window.signal_scroll_event().connect(sigc::mem_fun(*this, &Workspaces::handleScroll));
|
window.signal_scroll_event().connect(sigc::mem_fun(*this, &Workspaces::handleScroll));
|
||||||
}
|
}
|
||||||
@ -1159,9 +1159,9 @@ std::optional<int> Workspaces::parseWorkspaceId(std::string const& workspaceIdSt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Workspaces::handleScroll(GdkEventScroll *e) {
|
bool Workspaces::handleScroll(GdkEventScroll* e) {
|
||||||
// Ignore emulated scroll events on window
|
// Ignore emulated scroll events on window
|
||||||
if (gdk_event_get_pointer_emulated((GdkEvent *)e)) {
|
if (gdk_event_get_pointer_emulated((GdkEvent*)e)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
auto dir = AModule::getScrollDir(e);
|
auto dir = AModule::getScrollDir(e);
|
||||||
|
|||||||
@ -58,7 +58,6 @@ void IPC::startIPC() {
|
|||||||
int socketfd = connectToSocket();
|
int socketfd = connectToSocket();
|
||||||
|
|
||||||
std::thread([this, socketfd]() {
|
std::thread([this, socketfd]() {
|
||||||
|
|
||||||
spdlog::info("Niri IPC starting");
|
spdlog::info("Niri IPC starting");
|
||||||
|
|
||||||
auto unix_istream = Gio::UnixInputStream::create(socketfd, true);
|
auto unix_istream = Gio::UnixInputStream::create(socketfd, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user