From 749685b09f75578572c69a9ecbc901ed3eb71220 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Wed, 2 Aug 2023 03:28:57 -0400 Subject: Add date and formatting to `display-time-mode` --- init.el | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/init.el b/init.el index 109f5e7..6f934ae 100644 --- a/init.el +++ b/init.el @@ -289,11 +289,7 @@ ;; --------------------------------- ;; Display time in modeline -(defvar mm/display-time-format-string "%H:%M" - "Time format for `display-time-mode'.") - -(setq display-time-format mm/display-time-format-string - display-time-default-load-average nil) +(setq display-time-default-load-average nil) (defface mm/display-time-face '((((type x w32 mac)) @@ -301,12 +297,15 @@ "Face used to display the time in the modeline.") (setq display-time-string-forms - '((propertize (concat " " 24-hours ":" minutes " ") + '((propertize (concat + "[ " + (format-time-string "%Y-%m-%d" (current-time)) + " ]" + "[ " 24-hours ":" minutes " ]") 'face 'mm/display-time-face))) (display-time-mode) - ;; Display battery percentage in modeline (display-battery-mode) -- cgit v1.2.3