Skip to content

Commit 481b01d

Browse files
committed
fix: lint
1 parent 90911a1 commit 481b01d

File tree

11 files changed

+37
-44
lines changed

11 files changed

+37
-44
lines changed

include/modules/cava.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ class Cava final : public ALabel {
2323
util::SleeperThread thread_;
2424
util::SleeperThread thread_fetch_input_;
2525

26-
struct cava::error_s error_ {}; // cava errors
27-
struct cava::config_params prm_ {}; // cava parameters
28-
struct cava::audio_raw audio_raw_ {}; // cava handled raw audio data(is based on audio_data)
29-
struct cava::audio_data audio_data_ {}; // cava audio data
30-
struct cava::cava_plan* plan_; //{new cava_plan{}};
26+
struct cava::error_s error_{}; // cava errors
27+
struct cava::config_params prm_{}; // cava parameters
28+
struct cava::audio_raw audio_raw_{}; // cava handled raw audio data(is based on audio_data)
29+
struct cava::audio_data audio_data_{}; // cava audio data
30+
struct cava::cava_plan* plan_; //{new cava_plan{}};
3131
// Cava API to read audio source
3232
cava::ptr input_source_;
3333
// Delay to handle audio source
@@ -44,7 +44,7 @@ class Cava final : public ALabel {
4444
// Cava method
4545
void pause_resume();
4646
// ModuleActionMap
47-
static inline std::map<const std::string, void (waybar::modules::Cava::*const)()> actionMap_{
47+
static inline std::map<const std::string, void (waybar::modules::Cava::* const)()> actionMap_{
4848
{"mode", &waybar::modules::Cava::pause_resume}};
4949
};
5050
} // namespace waybar::modules

include/modules/clock.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ class Clock final : public ALabel {
5151
day cldBaseDay_{0}; // calendar Cached day. Is used when today is changing(midnight)
5252
std::string cldText_{""}; // calendar text to print
5353
CldMode cldMode_{CldMode::MONTH};
54-
auto get_calendar(const year_month_day& today, const year_month_day& ymd,
55-
const time_zone* tz) -> const std::string;
54+
auto get_calendar(const year_month_day& today, const year_month_day& ymd, const time_zone* tz)
55+
-> const std::string;
5656

5757
// get local time zone
5858
auto local_zone() -> const time_zone*;
@@ -79,7 +79,7 @@ class Clock final : public ALabel {
7979
void tz_up();
8080
void tz_down();
8181
// Module Action Map
82-
static inline std::map<const std::string, void (waybar::modules::Clock::*const)()> actionMap_{
82+
static inline std::map<const std::string, void (waybar::modules::Clock::* const)()> actionMap_{
8383
{"mode", &waybar::modules::Clock::cldModeSwitch},
8484
{"shift_up", &waybar::modules::Clock::cldShift_up},
8585
{"shift_down", &waybar::modules::Clock::cldShift_down},

include/modules/hyprland/workspaces.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ class Workspaces : public AModule, public EventHandler {
6161
// Config
6262
void parseConfig(const Json::Value& config);
6363
auto populateIconsMap(const Json::Value& formatIcons) -> void;
64-
static auto populateBoolConfig(const Json::Value& config, const std::string& key,
65-
bool& member) -> void;
64+
static auto populateBoolConfig(const Json::Value& config, const std::string& key, bool& member)
65+
-> void;
6666
auto populateSortByConfig(const Json::Value& config) -> void;
6767
auto populateIgnoreWorkspacesConfig(const Json::Value& config) -> void;
6868
auto populateFormatWindowSeparatorConfig(const Json::Value& config) -> void;

include/util/clara.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,8 @@ inline auto convertInto(std::string const &source, bool &target) -> ParserResult
622622
}
623623
#ifdef CLARA_CONFIG_OPTIONAL_TYPE
624624
template <typename T>
625-
inline auto convertInto(std::string const &source,
626-
CLARA_CONFIG_OPTIONAL_TYPE<T> &target) -> ParserResult {
625+
inline auto convertInto(std::string const &source, CLARA_CONFIG_OPTIONAL_TYPE<T> &target)
626+
-> ParserResult {
627627
T temp;
628628
auto result = convertInto(source, temp);
629629
if (result) target = std::move(temp);
@@ -751,8 +751,8 @@ class ParserBase {
751751
public:
752752
virtual ~ParserBase() = default;
753753
virtual auto validate() const -> Result { return Result::ok(); }
754-
virtual auto parse(std::string const &exeName,
755-
TokenStream const &tokens) const -> InternalParseResult = 0;
754+
virtual auto parse(std::string const &exeName, TokenStream const &tokens) const
755+
-> InternalParseResult = 0;
756756
virtual auto cardinality() const -> size_t { return 1; }
757757

758758
auto parse(Args const &args) const -> InternalParseResult {
@@ -1098,8 +1098,8 @@ struct Parser : ParserBase {
10981098

10991099
using ParserBase::parse;
11001100

1101-
auto parse(std::string const &exeName,
1102-
TokenStream const &tokens) const -> InternalParseResult override {
1101+
auto parse(std::string const &exeName, TokenStream const &tokens) const
1102+
-> InternalParseResult override {
11031103
struct ParserInfo {
11041104
ParserBase const *parser = nullptr;
11051105
size_t count = 0;

src/modules/bluetooth.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ auto getBoolProperty(GDBusProxy* proxy, const char* property_name) -> bool {
4949
return false;
5050
}
5151

52-
auto getOptionalStringProperty(GDBusProxy* proxy,
53-
const char* property_name) -> std::optional<std::string> {
52+
auto getOptionalStringProperty(GDBusProxy* proxy, const char* property_name)
53+
-> std::optional<std::string> {
5454
auto gvar = g_dbus_proxy_get_cached_property(proxy, property_name);
5555
if (gvar) {
5656
std::string property_value = g_variant_get_string(gvar, NULL);
@@ -345,8 +345,8 @@ auto waybar::modules::Bluetooth::onInterfaceAddedOrRemoved(GDBusObjectManager* m
345345

346346
auto waybar::modules::Bluetooth::onInterfaceProxyPropertiesChanged(
347347
GDBusObjectManagerClient* manager, GDBusObjectProxy* object_proxy, GDBusProxy* interface_proxy,
348-
GVariant* changed_properties, const gchar* const* invalidated_properties,
349-
gpointer user_data) -> void {
348+
GVariant* changed_properties, const gchar* const* invalidated_properties, gpointer user_data)
349+
-> void {
350350
std::string interface_name = g_dbus_proxy_get_interface_name(interface_proxy);
351351
std::string object_path = g_dbus_object_get_object_path(G_DBUS_OBJECT(object_proxy));
352352

@@ -395,8 +395,8 @@ auto waybar::modules::Bluetooth::getDeviceBatteryPercentage(GDBusObject* object)
395395
return std::nullopt;
396396
}
397397

398-
auto waybar::modules::Bluetooth::getDeviceProperties(GDBusObject* object,
399-
DeviceInfo& device_info) -> bool {
398+
auto waybar::modules::Bluetooth::getDeviceProperties(GDBusObject* object, DeviceInfo& device_info)
399+
-> bool {
400400
GDBusProxy* proxy_device = G_DBUS_PROXY(g_dbus_object_get_interface(object, "org.bluez.Device1"));
401401

402402
if (proxy_device != NULL) {
@@ -462,8 +462,9 @@ auto waybar::modules::Bluetooth::findCurController() -> std::optional<Controller
462462
return controller_info;
463463
}
464464

465-
auto waybar::modules::Bluetooth::findConnectedDevices(
466-
const std::string& cur_controller_path, std::vector<DeviceInfo>& connected_devices) -> void {
465+
auto waybar::modules::Bluetooth::findConnectedDevices(const std::string& cur_controller_path,
466+
std::vector<DeviceInfo>& connected_devices)
467+
-> void {
467468
GList* objects = g_dbus_object_manager_get_objects(manager_.get());
468469
for (GList* l = objects; l != NULL; l = l->next) {
469470
GDBusObject* object = G_DBUS_OBJECT(l->data);

src/modules/clock.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ const unsigned cldRowsInMonth(const year_month& ym, const weekday& firstdow) {
199199
return 2u + ceil<weeks>((weekday{ym / 1} - firstdow) + ((ym / last).day() - day{0})).count();
200200
}
201201

202-
auto cldGetWeekForLine(const year_month& ym, const weekday& firstdow,
203-
const unsigned line) -> const year_month_weekday {
202+
auto cldGetWeekForLine(const year_month& ym, const weekday& firstdow, const unsigned line)
203+
-> const year_month_weekday {
204204
unsigned index{line - 2};
205205
if (weekday{ym / 1} == firstdow) ++index;
206206
return ym / firstdow[index];

src/modules/dwl/window.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,9 @@ Window::~Window() {
9898
}
9999
}
100100

101-
void Window::handle_title(const char *title) {
102-
title_ = Glib::Markup::escape_text(title);
103-
}
101+
void Window::handle_title(const char *title) { title_ = Glib::Markup::escape_text(title); }
104102

105-
void Window::handle_appid(const char *appid) {
106-
appid_ = Glib::Markup::escape_text(appid);
107-
}
103+
void Window::handle_appid(const char *appid) { appid_ = Glib::Markup::escape_text(appid); }
108104

109105
void Window::handle_layout_symbol(const char *layout_symbol) {
110106
layout_symbol_ = Glib::Markup::escape_text(layout_symbol);

src/modules/hyprland/window.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,20 @@
66
#include <spdlog/spdlog.h>
77

88
#include <algorithm>
9+
#include <shared_mutex>
10+
#include <thread>
911
#include <vector>
1012

1113
#include "modules/hyprland/backend.hpp"
1214
#include "util/rewrite_string.hpp"
1315
#include "util/sanitize_str.hpp"
1416

15-
#include <shared_mutex>
16-
#include <thread>
17-
1817
namespace waybar::modules::hyprland {
1918

2019
std::shared_mutex windowIpcSmtx;
2120

2221
Window::Window(const std::string& id, const Bar& bar, const Json::Value& config)
2322
: AAppIconLabel(config, "window", id, "{title}", 0, true), bar_(bar) {
24-
2523
std::unique_lock<std::shared_mutex> windowIpcUniqueLock(windowIpcSmtx);
2624

2725
modulesReady = true;
@@ -51,7 +49,6 @@ Window::~Window() {
5149
}
5250

5351
auto Window::update() -> void {
54-
5552
std::shared_lock<std::shared_mutex> windowIpcShareLock(windowIpcSmtx);
5653

5754
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 {
153150
}
154151

155152
void Window::queryActiveWorkspace() {
156-
157153
std::shared_lock<std::shared_mutex> windowIpcShareLock(windowIpcSmtx);
158154

159155
if (separateOutputs_) {

src/modules/hyprland/workspaces.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,8 +590,8 @@ auto Workspaces::populateIconsMap(const Json::Value &formatIcons) -> void {
590590
m_iconsMap.emplace("", "");
591591
}
592592

593-
auto Workspaces::populateBoolConfig(const Json::Value &config, const std::string &key,
594-
bool &member) -> void {
593+
auto Workspaces::populateBoolConfig(const Json::Value &config, const std::string &key, bool &member)
594+
-> void {
595595
const auto &configValue = config[key];
596596
if (configValue.isBool()) {
597597
member = configValue.asBool();

src/modules/wlr/workspace_manager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ auto WorkspaceManager::sort_workspaces() -> void {
118118
}
119119
}
120120

121-
auto WorkspaceManager::register_manager(wl_registry *registry, uint32_t name,
122-
uint32_t version) -> void {
121+
auto WorkspaceManager::register_manager(wl_registry *registry, uint32_t name, uint32_t version)
122+
-> void {
123123
if (workspace_manager_) {
124124
spdlog::warn("Register workspace manager again although already registered!");
125125
return;

0 commit comments

Comments
 (0)