6be741afc9
Fix disabled tooltip on clock module
...
Seems like the tooltip text should only be set if both `if (tooltipEnabled())` and `if (config_["tooltip-format"].isString())` passes.
2022-02-02 12:41:06 +01:00
3a6e5be59d
Use locale when formatting clock
2022-01-14 10:36:24 -08:00
7f6bef2049
fix(util): make waybar_time formatter compatible with fmt 8.1.0
...
Stop using private implementation details of the `formatter<std::tm>`.
We never needed anything from the class besides the format specifier,
which is easily obtainable with public API.
2022-01-07 22:34:00 -08:00
c0d84853ea
refactor(clock): extract waybar_time to util/waybar_time.hpp
2022-01-07 18:09:44 -08:00
c5e4d26320
Fix working without timezone
2021-10-05 10:20:06 +00:00
d8bc6c92bb
Fix style and spelling
2021-10-05 09:55:30 +00:00
110c66dd32
Refactor Clock: generalize multi timezones and single timezone cases
...
After this refactoring:
1. Timezones parses only once on start and the we refer to saved values. All time_zone.isString() checks gone to the constructor.
2. Single timezone case handling as case of multi timezoned logic.
3. Scroll event seems more clear now.
4. Tooltip template parses on start to check if there calendar placeholder or not. To do not calculate calendar_text() if not necessary.
2021-10-03 16:57:55 +00:00
174db444d6
Fix Clock crash on empty string in timezones field
...
Also fixed timezones behavior: now waybar starting with the first timezone in timezones list and falling back to timezone field only if timezones omit or has no elements.
2021-10-03 03:27:54 +00:00
f18eb71ad7
Fix spelling errors
...
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr >
2021-10-02 18:13:17 +02:00
368e4813de
libfmt >=8.0.0 compatibility
2021-06-30 13:12:38 -05:00
ecba117dc0
remove unnessecary logging
2021-01-31 11:56:25 -08:00
d2a1f41750
Use g_unichar_iswide to properly align calendar on CJK locales
2021-01-31 11:53:53 -08:00
29f78e0426
Fix a few compiler warnings
...
There was one uninitialized value warning and two mismatched-sign
compare warnings. They both appear valid, the first occurring when MPD's
"format-stopped" contains {songPosition} or {queueLength} and the second
occurring when the clock's "timezones" array is more than 2 billion
items long (not likely, I admit). Fix both issues.
2020-11-30 18:07:22 -08:00
62082bdb01
clock: scroll through multiple timezones
2020-08-13 18:53:18 -04:00
8cd6e13308
clock: allow custom formatting for today in calendar
2020-08-13 18:53:18 -04:00
b251c51936
fix: spdlog
2020-05-22 20:02:09 +02:00
60bad8279e
feat: add comment
2020-05-22 19:09:50 +02:00
a871dcaebe
fix: type
2020-05-22 18:56:32 +02:00
cef5b27b48
fix: prefer default fmt date formatting unless timezone specified
2020-05-22 18:52:26 +02:00
4a7dd400fe
Merge branch 'master' into on-update
2020-04-12 18:32:19 +02:00
b40cdcb5bd
refactor: call parent update
2020-04-12 18:30:21 +02:00
e70f8d8730
fix(clock): lower precision of zoned_time to avoid fractional seconds in output
2020-02-06 10:04:22 -08:00
d1f427618f
Cache calendar per clock instance, weekdays properly handle locales.
2020-02-05 11:07:47 -08:00
cd2db19267
Detect presence, call nl_langinfo() to get first day of week.
2020-02-03 17:18:34 -08:00
4c40f9c635
Stop using a mutex for guarding CachedCalendar.
2020-02-03 17:18:34 -08:00
218bb3bc2b
Simpify calendar generation, single loop handles both first week and subsequent weeks.
2020-02-02 16:06:27 -08:00
f6b2005687
Cache calendar tooltip text to reduce computations.
2020-02-02 15:59:24 -08:00
ea9591baea
Switch from utfcpp to Glib::ustring for UTF-8 string mangling.
2020-02-02 15:59:24 -08:00
8e05aab4d9
Current month calendar in clock tooltip.
2020-01-31 10:36:40 -08:00
84b671f6b2
Attempt at supporting locale and timezones ( #1 )
2020-01-23 08:27:10 -05:00
6e30b7af3c
Remove duplicate dependency, use current locale
2020-01-23 08:27:00 -05:00
3130a57622
Add timezone support to clock module ( closes #223 )
2020-01-23 08:26:49 -05:00
0f0765e517
feat(modules): call user on-update if configured
2019-12-05 14:42:36 -08:00
1e82982dbd
Detect timezone changes
...
Fixes #479 , because upstream does not intend to.
It may be less expensive to do that only once in a while, or to inotify-watch on /etc/timezone, but this is good enough.
2019-10-04 23:25:09 +02:00
d24d85bebf
refactor: move label name and id to label contructor
2019-05-22 12:06:24 +02:00
97bd637f5d
refactor(clock): avoid usless time_point_cast
2019-05-22 11:51:33 +02:00
23d4a811db
refactor(clock): avoid usless duration_cast
2019-05-22 11:48:02 +02:00
5314b74dae
fix: remove workaround
2019-05-20 14:39:49 +02:00
5e43b4f587
Fix clock is always a second off
2019-05-19 13:30:19 +01:00
311c34ecbc
feat(Bar): handle widget size changes
2019-04-24 12:37:24 +02:00
6ed8f94dab
refactor: format code
2019-04-18 17:52:00 +02:00
ef88f0a223
fix: clock rounding
2019-03-07 12:34:21 +01:00
7245fb5d0a
Added clock tooltip with optional alternate format
2019-02-24 09:25:34 +01:00
399f61df98
refactor: proper modules destruction
2019-01-13 22:22:22 +01:00
b554094c7e
feat: args && class id
2018-12-18 17:30:54 +01:00
7befd27059
fix: clock interval
2018-12-04 09:38:08 +01:00
2b05b8e69a
chore: v0.2.2
2018-11-23 12:03:23 +01:00
ad7400d5ce
refactor(ALabel): add interval
2018-11-23 11:57:37 +01:00
bd62c4cbc5
feat(Label): use set_markup
2018-11-21 20:49:09 +01:00
3f269ff463
fix: check json::value type
2018-10-26 09:27:16 +02:00