chore: upgrade to clang-format@21
This commit is contained in:
@@ -7,48 +7,48 @@
|
||||
|
||||
namespace waybar::modules::river {
|
||||
|
||||
static void listen_focused_tags(void *data, struct zriver_output_status_v1 *zriver_output_status_v1,
|
||||
static void listen_focused_tags(void* data, struct zriver_output_status_v1* zriver_output_status_v1,
|
||||
uint32_t tags) {
|
||||
// Intentionally empty
|
||||
}
|
||||
|
||||
static void listen_view_tags(void *data, struct zriver_output_status_v1 *zriver_output_status_v1,
|
||||
struct wl_array *tags) {
|
||||
static void listen_view_tags(void* data, struct zriver_output_status_v1* zriver_output_status_v1,
|
||||
struct wl_array* tags) {
|
||||
// Intentionally empty
|
||||
}
|
||||
|
||||
static void listen_urgent_tags(void *data, struct zriver_output_status_v1 *zriver_output_status_v1,
|
||||
static void listen_urgent_tags(void* data, struct zriver_output_status_v1* zriver_output_status_v1,
|
||||
uint32_t tags) {
|
||||
// Intentionally empty
|
||||
}
|
||||
|
||||
static void listen_layout_name(void *data, struct zriver_output_status_v1 *zriver_output_status_v1,
|
||||
const char *layout) {
|
||||
static_cast<Layout *>(data)->handle_name(layout);
|
||||
static void listen_layout_name(void* data, struct zriver_output_status_v1* zriver_output_status_v1,
|
||||
const char* layout) {
|
||||
static_cast<Layout*>(data)->handle_name(layout);
|
||||
}
|
||||
|
||||
static void listen_layout_name_clear(void *data,
|
||||
struct zriver_output_status_v1 *zriver_output_status_v1) {
|
||||
static_cast<Layout *>(data)->handle_clear();
|
||||
static void listen_layout_name_clear(void* data,
|
||||
struct zriver_output_status_v1* zriver_output_status_v1) {
|
||||
static_cast<Layout*>(data)->handle_clear();
|
||||
}
|
||||
|
||||
static void listen_focused_output(void *data, struct zriver_seat_status_v1 *zriver_seat_status_v1,
|
||||
struct wl_output *output) {
|
||||
static_cast<Layout *>(data)->handle_focused_output(output);
|
||||
static void listen_focused_output(void* data, struct zriver_seat_status_v1* zriver_seat_status_v1,
|
||||
struct wl_output* output) {
|
||||
static_cast<Layout*>(data)->handle_focused_output(output);
|
||||
}
|
||||
|
||||
static void listen_unfocused_output(void *data, struct zriver_seat_status_v1 *zriver_seat_status_v1,
|
||||
struct wl_output *output) {
|
||||
static_cast<Layout *>(data)->handle_unfocused_output(output);
|
||||
static void listen_unfocused_output(void* data, struct zriver_seat_status_v1* zriver_seat_status_v1,
|
||||
struct wl_output* output) {
|
||||
static_cast<Layout*>(data)->handle_unfocused_output(output);
|
||||
}
|
||||
|
||||
static void listen_focused_view(void *data, struct zriver_seat_status_v1 *zriver_seat_status_v1,
|
||||
const char *title) {
|
||||
static void listen_focused_view(void* data, struct zriver_seat_status_v1* zriver_seat_status_v1,
|
||||
const char* title) {
|
||||
// Intentionally empty
|
||||
}
|
||||
|
||||
static void listen_mode(void *data, struct zriver_seat_status_v1 *zriver_seat_status_v1,
|
||||
const char *mode) {
|
||||
static void listen_mode(void* data, struct zriver_seat_status_v1* zriver_seat_status_v1,
|
||||
const char* mode) {
|
||||
// Intentionally empty
|
||||
}
|
||||
|
||||
@@ -67,8 +67,8 @@ static const zriver_seat_status_v1_listener seat_status_listener_impl{
|
||||
.mode = listen_mode,
|
||||
};
|
||||
|
||||
static void handle_global(void *data, struct wl_registry *registry, uint32_t name,
|
||||
const char *interface, uint32_t version) {
|
||||
static void handle_global(void* data, struct wl_registry* registry, uint32_t name,
|
||||
const char* interface, uint32_t version) {
|
||||
if (std::strcmp(interface, zriver_status_manager_v1_interface.name) == 0) {
|
||||
version = std::min<uint32_t>(version, 4);
|
||||
|
||||
@@ -80,32 +80,32 @@ static void handle_global(void *data, struct wl_registry *registry, uint32_t nam
|
||||
std::to_string(version));
|
||||
return;
|
||||
}
|
||||
static_cast<Layout *>(data)->status_manager_ = static_cast<struct zriver_status_manager_v1 *>(
|
||||
static_cast<Layout*>(data)->status_manager_ = static_cast<struct zriver_status_manager_v1*>(
|
||||
wl_registry_bind(registry, name, &zriver_status_manager_v1_interface, version));
|
||||
}
|
||||
|
||||
if (std::strcmp(interface, wl_seat_interface.name) == 0) {
|
||||
version = std::min<uint32_t>(version, 1);
|
||||
static_cast<Layout *>(data)->seat_ = static_cast<struct wl_seat *>(
|
||||
wl_registry_bind(registry, name, &wl_seat_interface, version));
|
||||
static_cast<Layout*>(data)->seat_ =
|
||||
static_cast<struct wl_seat*>(wl_registry_bind(registry, name, &wl_seat_interface, version));
|
||||
}
|
||||
}
|
||||
|
||||
static void handle_global_remove(void *data, struct wl_registry *registry, uint32_t name) {
|
||||
static void handle_global_remove(void* data, struct wl_registry* registry, uint32_t name) {
|
||||
// Nobody cares
|
||||
}
|
||||
|
||||
static const wl_registry_listener registry_listener_impl = {.global = handle_global,
|
||||
.global_remove = handle_global_remove};
|
||||
|
||||
Layout::Layout(const std::string &id, const waybar::Bar &bar, const Json::Value &config)
|
||||
Layout::Layout(const std::string& id, const waybar::Bar& bar, const Json::Value& config)
|
||||
: waybar::ALabel(config, "layout", id, "{}"),
|
||||
status_manager_{nullptr},
|
||||
seat_{nullptr},
|
||||
bar_(bar),
|
||||
output_status_{nullptr} {
|
||||
struct wl_display *display = Client::inst()->wl_display;
|
||||
struct wl_registry *registry = wl_display_get_registry(display);
|
||||
struct wl_display* display = Client::inst()->wl_display;
|
||||
struct wl_registry* registry = wl_display_get_registry(display);
|
||||
wl_registry_add_listener(registry, ®istry_listener_impl, this);
|
||||
wl_display_roundtrip(display);
|
||||
|
||||
@@ -141,7 +141,7 @@ Layout::~Layout() {
|
||||
}
|
||||
}
|
||||
|
||||
void Layout::handle_name(const char *name) {
|
||||
void Layout::handle_name(const char* name) {
|
||||
if (std::strcmp(name, "") == 0 || format_.empty()) {
|
||||
label_.hide(); // hide empty labels or labels with empty format
|
||||
} else {
|
||||
@@ -162,7 +162,7 @@ void Layout::handle_clear() {
|
||||
ALabel::update();
|
||||
}
|
||||
|
||||
void Layout::handle_focused_output(struct wl_output *output) {
|
||||
void Layout::handle_focused_output(struct wl_output* output) {
|
||||
if (output_ == output) { // if we focused the output this bar belongs to
|
||||
label_.get_style_context()->add_class("focused");
|
||||
ALabel::update();
|
||||
@@ -170,7 +170,7 @@ void Layout::handle_focused_output(struct wl_output *output) {
|
||||
focused_output_ = output;
|
||||
}
|
||||
|
||||
void Layout::handle_unfocused_output(struct wl_output *output) {
|
||||
void Layout::handle_unfocused_output(struct wl_output* output) {
|
||||
if (output_ == output) { // if we unfocused the output this bar belongs to
|
||||
label_.get_style_context()->remove_class("focused");
|
||||
ALabel::update();
|
||||
|
||||
Reference in New Issue
Block a user