mirror of https://github.com/polybar/polybar.git
parent
e42eb87177
commit
789345291b
|
@ -206,6 +206,7 @@ class bar : public xpp::event::sink<evt::button_press, evt::expose> {
|
|||
// Set misc parameters {{{
|
||||
|
||||
m_bar.separator = string_util::trim(m_conf.get<string>(bs, "separator", ""), '"');
|
||||
m_bar.locale = m_conf.get<string>(bs, "locale", "");
|
||||
|
||||
// }}}
|
||||
// Checking nodraw {{{
|
||||
|
|
|
@ -16,6 +16,8 @@ enum class gc { NONE = 0, BG, FG, OL, UL, BT, BB, BL, BR };
|
|||
struct bar_settings {
|
||||
bar_settings() = default;
|
||||
|
||||
string locale;
|
||||
|
||||
int16_t x{0};
|
||||
int16_t y{0};
|
||||
uint16_t width{0};
|
||||
|
|
|
@ -10,6 +10,9 @@ namespace modules {
|
|||
using timer_module::timer_module;
|
||||
|
||||
void setup() {
|
||||
if (!m_bar.locale.empty())
|
||||
setlocale(LC_TIME, m_bar.locale.c_str());
|
||||
|
||||
m_interval = chrono::duration<double>(m_conf.get<float>(name(), "interval", 1));
|
||||
|
||||
m_formatter->add(DEFAULT_FORMAT, TAG_DATE, {TAG_DATE});
|
||||
|
|
Loading…
Reference in New Issue