chore: cpplint fixes hyprland classes
parent
8fc4187713
commit
4cb8efbecc
|
@ -167,12 +167,14 @@ std::string IPC::getSocket1Reply(const std::string& rq) {
|
||||||
std::string socketPath = "/tmp/hypr/" + instanceSigStr + "/.socket.sock";
|
std::string socketPath = "/tmp/hypr/" + instanceSigStr + "/.socket.sock";
|
||||||
|
|
||||||
// Use snprintf to copy the socketPath string into serverAddress.sun_path
|
// Use snprintf to copy the socketPath string into serverAddress.sun_path
|
||||||
if (snprintf(serverAddress.sun_path, sizeof(serverAddress.sun_path), "%s", socketPath.c_str()) < 0) {
|
if (snprintf(serverAddress.sun_path, sizeof(serverAddress.sun_path), "%s", socketPath.c_str()) <
|
||||||
|
0) {
|
||||||
spdlog::error("Hyprland IPC: Couldn't copy socket path (6)");
|
spdlog::error("Hyprland IPC: Couldn't copy socket path (6)");
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (connect(SERVERSOCKET, (sockaddr*)&serverAddress, sizeof(serverAddress)) < 0) {
|
if (connect(SERVERSOCKET, reinterpret_cast<sockaddr*>(&serverAddress), sizeof(serverAddress)) <
|
||||||
|
0) {
|
||||||
spdlog::error("Hyprland IPC: Couldn't connect to " + socketPath + ". (3)");
|
spdlog::error("Hyprland IPC: Couldn't connect to " + socketPath + ". (3)");
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
#include <xkbcommon/xkbcommon.h>
|
#include <xkbcommon/xkbcommon.h>
|
||||||
#include <xkbcommon/xkbregistry.h>
|
#include <xkbcommon/xkbregistry.h>
|
||||||
|
|
||||||
#include <util/sanitize_str.hpp>
|
#include "util/sanitize_str.hpp"
|
||||||
|
|
||||||
#include "util/string.hpp"
|
#include "util/string.hpp"
|
||||||
|
|
||||||
namespace waybar::modules::hyprland {
|
namespace waybar::modules::hyprland {
|
||||||
|
@ -97,7 +96,6 @@ void Language::initLanguage() {
|
||||||
spdlog::debug("hyprland language initLanguage found {}", layout_.full_name);
|
spdlog::debug("hyprland language initLanguage found {}", layout_.full_name);
|
||||||
|
|
||||||
dp.emit();
|
dp.emit();
|
||||||
|
|
||||||
} catch (std::exception& e) {
|
} catch (std::exception& e) {
|
||||||
spdlog::error("hyprland language initLanguage failed with {}", e.what());
|
spdlog::error("hyprland language initLanguage failed with {}", e.what());
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <spdlog/spdlog.h>
|
#include <spdlog/spdlog.h>
|
||||||
|
|
||||||
#include <util/sanitize_str.hpp>
|
#include "util/sanitize_str.hpp"
|
||||||
|
|
||||||
namespace waybar::modules::hyprland {
|
namespace waybar::modules::hyprland {
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,11 @@
|
||||||
#include <spdlog/spdlog.h>
|
#include <spdlog/spdlog.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <regex>
|
|
||||||
#include <util/sanitize_str.hpp>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "modules/hyprland/backend.hpp"
|
#include "modules/hyprland/backend.hpp"
|
||||||
#include "util/rewrite_string.hpp"
|
#include "util/rewrite_string.hpp"
|
||||||
|
#include "util/sanitize_str.hpp"
|
||||||
|
|
||||||
namespace waybar::modules::hyprland {
|
namespace waybar::modules::hyprland {
|
||||||
|
|
||||||
|
|
|
@ -327,7 +327,7 @@ Workspace::Workspace(const Json::Value &workspace_data)
|
||||||
button_.set_relief(Gtk::RELIEF_NONE);
|
button_.set_relief(Gtk::RELIEF_NONE);
|
||||||
content_.set_center_widget(label_);
|
content_.set_center_widget(label_);
|
||||||
button_.add(content_);
|
button_.add(content_);
|
||||||
};
|
}
|
||||||
|
|
||||||
void add_or_remove_class(const Glib::RefPtr<Gtk::StyleContext> &context, bool condition,
|
void add_or_remove_class(const Glib::RefPtr<Gtk::StyleContext> &context, bool condition,
|
||||||
const std::string &class_name) {
|
const std::string &class_name) {
|
||||||
|
|
Loading…
Reference in New Issue