diff --git a/include/modules/meta/base.hpp b/include/modules/meta/base.hpp index 7a11a858..bd56f086 100644 --- a/include/modules/meta/base.hpp +++ b/include/modules/meta/base.hpp @@ -16,6 +16,9 @@ POLYBAR_NS +namespace chrono = std::chrono; +using namespace std::chrono_literals; + #define DEFAULT_FORMAT "format" #define DEFINE_MODULE(name, type) struct name : public type @@ -44,8 +47,6 @@ class builder; // }}} namespace modules { - namespace chrono = std::chrono; - using namespace std::chrono_literals; using namespace drawtypes; DEFINE_ERROR(module_error); diff --git a/src/utils/env.cpp b/src/utils/env.cpp index 77697416..393f978f 100644 --- a/src/utils/env.cpp +++ b/src/utils/env.cpp @@ -7,12 +7,12 @@ POLYBAR_NS namespace env_util { bool has(const char* var) { return std::getenv(var) != nullptr; - }; + } string get(const char* var, string fallback) { const char* value{std::getenv(var)}; return value != nullptr ? value : fallback; - }; + } } POLYBAR_NS_END