From f4384b6252e86d4e2558e1c36810d4ef903bd58c Mon Sep 17 00:00:00 2001 From: Ross MacLeod Date: Wed, 7 Feb 2024 01:04:32 -0500 Subject: [PATCH] feat: enable use of markup in clock module format and format_popup, and update documentation to reflect supporting Pango markup in both --- docs/modules/Clock.md | 6 +++--- src/modules/clock.rs | 11 ++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/modules/Clock.md b/docs/modules/Clock.md index 89cbbde4..28630ffa 100644 --- a/docs/modules/Clock.md +++ b/docs/modules/Clock.md @@ -10,8 +10,8 @@ Clicking on the widget opens a popup with the time and a calendar. | Name | Type | Default | Description | |----------------|----------|------------------------------------|-------------------------------------------------------------------------------------| -| `format` | `string` | `%d/%m/%Y %H:%M` | Date/time format string. | -| `format_popup` | `string` | `%H:%M:%S` | Date/time format string to display in the popup header. | +| `format` | `string` | `%d/%m/%Y %H:%M` | Date/time format string. Pango markup is supported. | +| `format_popup` | `string` | `%H:%M:%S` | Date/time format string to display in the popup header. Pango markup is supported. | | `locale` | `string` | `$LC_TIME` or `$LANG` or `'POSIX'` | Locale to use (eg `en_GB`). Defaults to the system language (reading from env var). | > Detail on available tokens can be found here: @@ -80,4 +80,4 @@ end: | `.popup-clock .calendar-clock` | Clock inside the popup | | `.popup-clock .calendar` | Calendar widget inside the popup. GTK provides some OOTB styling options for this. | -For more information on styling, please see the [styling guide](styling-guide). \ No newline at end of file +For more information on styling, please see the [styling guide](styling-guide). diff --git a/src/modules/clock.rs b/src/modules/clock.rs index 1251819f..d41ddf93 100644 --- a/src/modules/clock.rs +++ b/src/modules/clock.rs @@ -99,8 +99,10 @@ impl Module