From 6e73c58e60285f0c7d85d35bf6ea2ab7f0ff4741 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 18 Oct 2022 09:01:45 +0200 Subject: [PATCH] fix: lint --- include/factory.hpp | 2 +- src/modules/hyprland/window.cpp | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/factory.hpp b/include/factory.hpp index 0f770b97..55031b83 100644 --- a/include/factory.hpp +++ b/include/factory.hpp @@ -73,9 +73,9 @@ #include "modules/jack.hpp" #endif #include "bar.hpp" -#include "modules/user.hpp" #include "modules/custom.hpp" #include "modules/temperature.hpp" +#include "modules/user.hpp" namespace waybar { diff --git a/src/modules/hyprland/window.cpp b/src/modules/hyprland/window.cpp index 1a9866e6..cd1584d3 100644 --- a/src/modules/hyprland/window.cpp +++ b/src/modules/hyprland/window.cpp @@ -45,9 +45,8 @@ uint Window::getActiveWorkspaceID(std::string monitorName) { assert(cmd.exit_code == 0); Json::Value json = parser_.parse(cmd.out); assert(json.isArray()); - auto monitor = std::find_if(json.begin(), json.end(), [&](Json::Value monitor){ - return monitor["name"] == monitorName; - }); + auto monitor = std::find_if(json.begin(), json.end(), + [&](Json::Value monitor) { return monitor["name"] == monitorName; }); assert(monitor != std::end(json)); return (*monitor)["activeWorkspace"]["id"].as(); } @@ -57,7 +56,7 @@ std::string Window::getLastWindowTitle(uint workspaceID) { assert(cmd.exit_code == 0); Json::Value json = parser_.parse(cmd.out); assert(json.isArray()); - auto workspace = std::find_if(json.begin(), json.end(), [&](Json::Value workspace){ + auto workspace = std::find_if(json.begin(), json.end(), [&](Json::Value workspace) { return workspace["id"].as() == workspaceID; }); assert(workspace != std::end(json));