From 168c936ca9475105b0182fdd4bd4d7c2e5ed2800 Mon Sep 17 00:00:00 2001 From: Lemmy Date: Sat, 4 Apr 2026 08:58:14 -0400 Subject: [PATCH] chore(lefthook): test clang format --- lefthook.yml | 4 ++++ src/shell/WidgetFactory.cpp | 4 ++-- src/shell/WidgetFactory.h | 4 ++-- src/ui/controls/Chip.h | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 lefthook.yml diff --git a/lefthook.yml b/lefthook.yml new file mode 100644 index 000000000..a02a7936e --- /dev/null +++ b/lefthook.yml @@ -0,0 +1,4 @@ +pre-commit: + jobs: + - name: clang-format + run: cd "$(git rev-parse --show-toplevel)" && just format && git update-index --again diff --git a/src/shell/WidgetFactory.cpp b/src/shell/WidgetFactory.cpp index 5393c1bb4..822cd263c 100644 --- a/src/shell/WidgetFactory.cpp +++ b/src/shell/WidgetFactory.cpp @@ -11,8 +11,8 @@ #include "shell/widgets/WorkspacesWidget.h" WidgetFactory::WidgetFactory(WaylandConnection& wayland, TimeService* time, const Config& config, - NotificationManager* notifications, TrayService* tray) - : m_wayland(wayland), m_time(time), m_config(config), m_notifications(notifications), m_tray(tray) {} + NotificationManager* notifications, TrayService* tray) + : m_wayland(wayland), m_time(time), m_config(config), m_notifications(notifications), m_tray(tray) {} std::unique_ptr WidgetFactory::create(const std::string& name, wl_output* output) const { if (name == "clock") { diff --git a/src/shell/WidgetFactory.h b/src/shell/WidgetFactory.h index e1aa501f0..cdf483818 100644 --- a/src/shell/WidgetFactory.h +++ b/src/shell/WidgetFactory.h @@ -14,8 +14,8 @@ class WaylandConnection; class WidgetFactory { public: - WidgetFactory(WaylandConnection& wayland, TimeService* time, const Config& config, - NotificationManager* notifications, TrayService* tray); + WidgetFactory(WaylandConnection& wayland, TimeService* time, const Config& config, NotificationManager* notifications, + TrayService* tray); [[nodiscard]] std::unique_ptr create(const std::string& name, wl_output* output) const; diff --git a/src/ui/controls/Chip.h b/src/ui/controls/Chip.h index 22aaf1da5..a4b796754 100644 --- a/src/ui/controls/Chip.h +++ b/src/ui/controls/Chip.h @@ -6,8 +6,8 @@ class Label; -// Compact label + rounded fill for inline chips (e.g. workspace). Not a Button — no -// pointer/press semantics; chrome matches borderless shadcn-style chips. +// Compact label + rounded fill for inline chips (e.g. workspace). +// Not a Button — no pointer/press semantics class Chip : public Box { public: Chip();