Commit Graph

86 Commits

Author SHA1 Message Date
e9e5780aae Calendar scrolling opportunity 2022-08-06 13:55:20 +03:00
3117aefdf3 fix: drop conditionals for ancient fmt versions 2022-07-13 22:36:33 -07:00
36aa22189b Last weekday applies Unix fmt 2022-06-24 16:44:06 +03:00
315ea991bc Calendar module: localization issue #1552 Linter #60 2022-05-13 23:56:08 +03:00
bd0f6128d3 Revert "Waybar. Issue#1552. Calendar module, LC_TIME variable"
This reverts commit 7b7ee41e13.
2022-05-13 22:58:38 +03:00
5a014305ec Revert "Issue#1552. Calendar module, LC_TIME variable"
This reverts commit 448b413eca.
2022-05-13 22:58:00 +03:00
e615612bf4 Calendar module: localization issue #1552 2022-05-13 18:51:32 +03:00
448b413eca Issue#1552. Calendar module, LC_TIME variable 2022-05-13 12:54:18 +03:00
7b7ee41e13 Waybar. Issue#1552. Calendar module, LC_TIME variable 2022-05-12 19:04:45 +03:00
4e3f91d237 Issue 1226/1497: align updates with times divisible by interval 2022-04-16 14:21:28 +02:00
e5d05baba3 Issue 1226/1497: Replace sleep_until with sleep_for to prevent clock from getting stuck with system time adjustment 2022-04-16 14:21:28 +02:00
54b1df69a9 fix: lint clock 2022-04-15 14:39:13 +02:00
6ad1f6b853 Merge branch 'master' into master 2022-04-10 09:54:50 +00:00
f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
4a457648f9 Waybar. Clock module. Calendar - custom output formats 2022-03-27 11:15:56 +03:00
1d2a381b5f Waybar. Clock module - weeknum fix for the left side 2022-03-25 18:51:59 +03:00
2d87bcb1ab https://github.com/Alexays/Waybar/issues/1315. Option to display week number on calendar 2022-03-24 15:41:50 +03:00
8b6bc215cc Fix freebsd action 2022-03-10 14:48:40 +01:00
b6655e475b Merge branch 'master' into list_of_times 2022-03-08 09:59:22 +01:00
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
ece86c96d7 Feature Clock: show list of time in other timezones in a tooltip
Introducing new tooltip placeholder: {timezoned_time_list}. It will be replaced with the list of times in different time zones.
I've found it useful to hover the mouse pointer on time and see time in all my timezones at once.
Current timezone excluding from the list, so if you will scroll over the time module and change the active timezone, this timezone will be excluded from the list and the previous active zone will be added.
2021-12-01 17:08:05 +00: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