fix: lint
This commit is contained in:
@ -49,8 +49,8 @@ auto getBoolProperty(GDBusProxy* proxy, const char* property_name) -> bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto getOptionalStringProperty(GDBusProxy* proxy,
|
||||
const char* property_name) -> std::optional<std::string> {
|
||||
auto getOptionalStringProperty(GDBusProxy* proxy, const char* property_name)
|
||||
-> std::optional<std::string> {
|
||||
auto gvar = g_dbus_proxy_get_cached_property(proxy, property_name);
|
||||
if (gvar) {
|
||||
std::string property_value = g_variant_get_string(gvar, NULL);
|
||||
@ -345,8 +345,8 @@ auto waybar::modules::Bluetooth::onInterfaceAddedOrRemoved(GDBusObjectManager* m
|
||||
|
||||
auto waybar::modules::Bluetooth::onInterfaceProxyPropertiesChanged(
|
||||
GDBusObjectManagerClient* manager, GDBusObjectProxy* object_proxy, GDBusProxy* interface_proxy,
|
||||
GVariant* changed_properties, const gchar* const* invalidated_properties,
|
||||
gpointer user_data) -> void {
|
||||
GVariant* changed_properties, const gchar* const* invalidated_properties, gpointer user_data)
|
||||
-> void {
|
||||
std::string interface_name = g_dbus_proxy_get_interface_name(interface_proxy);
|
||||
std::string object_path = g_dbus_object_get_object_path(G_DBUS_OBJECT(object_proxy));
|
||||
|
||||
@ -395,8 +395,8 @@ auto waybar::modules::Bluetooth::getDeviceBatteryPercentage(GDBusObject* object)
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
auto waybar::modules::Bluetooth::getDeviceProperties(GDBusObject* object,
|
||||
DeviceInfo& device_info) -> bool {
|
||||
auto waybar::modules::Bluetooth::getDeviceProperties(GDBusObject* object, DeviceInfo& device_info)
|
||||
-> bool {
|
||||
GDBusProxy* proxy_device = G_DBUS_PROXY(g_dbus_object_get_interface(object, "org.bluez.Device1"));
|
||||
|
||||
if (proxy_device != NULL) {
|
||||
@ -462,8 +462,9 @@ auto waybar::modules::Bluetooth::findCurController() -> std::optional<Controller
|
||||
return controller_info;
|
||||
}
|
||||
|
||||
auto waybar::modules::Bluetooth::findConnectedDevices(
|
||||
const std::string& cur_controller_path, std::vector<DeviceInfo>& connected_devices) -> void {
|
||||
auto waybar::modules::Bluetooth::findConnectedDevices(const std::string& cur_controller_path,
|
||||
std::vector<DeviceInfo>& connected_devices)
|
||||
-> void {
|
||||
GList* objects = g_dbus_object_manager_get_objects(manager_.get());
|
||||
for (GList* l = objects; l != NULL; l = l->next) {
|
||||
GDBusObject* object = G_DBUS_OBJECT(l->data);
|
||||
|
@ -199,8 +199,8 @@ const unsigned cldRowsInMonth(const year_month& ym, const weekday& firstdow) {
|
||||
return 2u + ceil<weeks>((weekday{ym / 1} - firstdow) + ((ym / last).day() - day{0})).count();
|
||||
}
|
||||
|
||||
auto cldGetWeekForLine(const year_month& ym, const weekday& firstdow,
|
||||
const unsigned line) -> const year_month_weekday {
|
||||
auto cldGetWeekForLine(const year_month& ym, const weekday& firstdow, const unsigned line)
|
||||
-> const year_month_weekday {
|
||||
unsigned index{line - 2};
|
||||
if (weekday{ym / 1} == firstdow) ++index;
|
||||
return ym / firstdow[index];
|
||||
|
@ -98,13 +98,9 @@ Window::~Window() {
|
||||
}
|
||||
}
|
||||
|
||||
void Window::handle_title(const char *title) {
|
||||
title_ = Glib::Markup::escape_text(title);
|
||||
}
|
||||
void Window::handle_title(const char *title) { title_ = Glib::Markup::escape_text(title); }
|
||||
|
||||
void Window::handle_appid(const char *appid) {
|
||||
appid_ = Glib::Markup::escape_text(appid);
|
||||
}
|
||||
void Window::handle_appid(const char *appid) { appid_ = Glib::Markup::escape_text(appid); }
|
||||
|
||||
void Window::handle_layout_symbol(const char *layout_symbol) {
|
||||
layout_symbol_ = Glib::Markup::escape_text(layout_symbol);
|
||||
|
@ -6,22 +6,20 @@
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <shared_mutex>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
#include "modules/hyprland/backend.hpp"
|
||||
#include "util/rewrite_string.hpp"
|
||||
#include "util/sanitize_str.hpp"
|
||||
|
||||
#include <shared_mutex>
|
||||
#include <thread>
|
||||
|
||||
namespace waybar::modules::hyprland {
|
||||
|
||||
std::shared_mutex windowIpcSmtx;
|
||||
|
||||
Window::Window(const std::string& id, const Bar& bar, const Json::Value& config)
|
||||
: AAppIconLabel(config, "window", id, "{title}", 0, true), bar_(bar) {
|
||||
|
||||
std::unique_lock<std::shared_mutex> windowIpcUniqueLock(windowIpcSmtx);
|
||||
|
||||
modulesReady = true;
|
||||
@ -51,7 +49,6 @@ Window::~Window() {
|
||||
}
|
||||
|
||||
auto Window::update() -> void {
|
||||
|
||||
std::shared_lock<std::shared_mutex> windowIpcShareLock(windowIpcSmtx);
|
||||
|
||||
std::string windowName = waybar::util::sanitize_string(workspace_.last_window_title);
|
||||
@ -153,7 +150,6 @@ auto Window::WindowData::parse(const Json::Value& value) -> Window::WindowData {
|
||||
}
|
||||
|
||||
void Window::queryActiveWorkspace() {
|
||||
|
||||
std::shared_lock<std::shared_mutex> windowIpcShareLock(windowIpcSmtx);
|
||||
|
||||
if (separateOutputs_) {
|
||||
|
@ -590,8 +590,8 @@ auto Workspaces::populateIconsMap(const Json::Value &formatIcons) -> void {
|
||||
m_iconsMap.emplace("", "");
|
||||
}
|
||||
|
||||
auto Workspaces::populateBoolConfig(const Json::Value &config, const std::string &key,
|
||||
bool &member) -> void {
|
||||
auto Workspaces::populateBoolConfig(const Json::Value &config, const std::string &key, bool &member)
|
||||
-> void {
|
||||
const auto &configValue = config[key];
|
||||
if (configValue.isBool()) {
|
||||
member = configValue.asBool();
|
||||
|
@ -118,8 +118,8 @@ auto WorkspaceManager::sort_workspaces() -> void {
|
||||
}
|
||||
}
|
||||
|
||||
auto WorkspaceManager::register_manager(wl_registry *registry, uint32_t name,
|
||||
uint32_t version) -> void {
|
||||
auto WorkspaceManager::register_manager(wl_registry *registry, uint32_t name, uint32_t version)
|
||||
-> void {
|
||||
if (workspace_manager_) {
|
||||
spdlog::warn("Register workspace manager again although already registered!");
|
||||
return;
|
||||
|
@ -126,7 +126,7 @@ void PipewireBackend::handleRegistryEventGlobal(uint32_t id, uint32_t permission
|
||||
if (proxy == nullptr) return;
|
||||
|
||||
auto *pNodeInfo = (PrivacyNodeInfo *)pw_proxy_get_user_data(proxy);
|
||||
new(pNodeInfo) PrivacyNodeInfo{};
|
||||
new (pNodeInfo) PrivacyNodeInfo{};
|
||||
pNodeInfo->id = id;
|
||||
pNodeInfo->data = this;
|
||||
pNodeInfo->type = mediaType;
|
||||
|
Reference in New Issue
Block a user