diff --git a/examples/config.cmake b/examples/config.cmake index de0b09cd..4cff7b0f 100644 --- a/examples/config.cmake +++ b/examples/config.cmake @@ -231,12 +231,20 @@ label-disconnected-foreground = ${colors.foreground-alt} [module/date] type = internal/date -date = %H:%M interval = 5 -format-prefix = " " + +date = +date-alt = " %Y-%m-%d" + +time = %H:%M +time-alt = %H:%M:%S + +format-prefix =  format-prefix-foreground = ${colors.foreground-alt} format-underline = #0a6cf5 +label = %date% %time% + [module/volume] type = internal/volume diff --git a/include/modules/date.hpp b/include/modules/date.hpp index 8b1315d8..aab752d0 100644 --- a/include/modules/date.hpp +++ b/include/modules/date.hpp @@ -13,16 +13,27 @@ namespace modules { bool update(); bool build(builder* builder, const string& tag) const; bool handle_event(string cmd); - bool receive_events() const; + bool receive_events() const { + return true; + } private: - static constexpr auto TAG_DATE = ""; + static constexpr auto TAG_LABEL = "