diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-06-11 17:17:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-11 17:17:45 +0200 |
| commit | 8c64a4bad710fb18e9b84812bd680a89d1e93661 (patch) | |
| tree | 2439b8408abd8e14f6af35ef9cfbeb7c51429f99 /src/helpers/Monitor.cpp | |
| parent | 1f46296ea05f9a8e6020ab694b531c91a1abdfa6 (diff) | |
core: move to hyprutils for utils (#6385)
* core: move to hyprutils for utils
Nix: add hyprutils dep
* Meson: add hyprutils dep
* flake.lock: update
---------
Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
Diffstat (limited to 'src/helpers/Monitor.cpp')
| -rw-r--r-- | src/helpers/Monitor.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index a30f1057..027b47bd 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -6,6 +6,8 @@ #include "../devices/ITouch.hpp" #include "../protocols/LayerShell.hpp" #include "../protocols/PresentationTime.hpp" +#include <hyprutils/string/String.hpp> +using namespace Hyprutils::String; int ratHandler(void* data) { g_pHyprRenderer->renderMonitor((CMonitor*)data); @@ -71,8 +73,7 @@ void CMonitor::onConnect(bool noRule) { std::erase(szDescription, ','); // field is backwards-compatible with intended usage of `szDescription` but excludes the parenthesized DRM node name suffix - szShortDescription = - removeBeginEndSpacesTabs(std::format("{} {} {}", output->make ? output->make : "", output->model ? output->model : "", output->serial ? output->serial : "")); + szShortDescription = trim(std::format("{} {} {}", output->make ? output->make : "", output->model ? output->model : "", output->serial ? output->serial : "")); std::erase(szShortDescription, ','); if (!wlr_backend_is_drm(output->backend)) |
