diff options
author | Mountain Man <43313373+MountainMan1312@users.noreply.github.com> | 2023-08-02 03:28:57 -0400 |
---|---|---|
committer | Mountain Man <43313373+MountainMan1312@users.noreply.github.com> | 2023-08-02 03:28:57 -0400 |
commit | 749685b09f75578572c69a9ecbc901ed3eb71220 (patch) | |
tree | a13e225694b8c75fe982a0803c9ae5fd56d64c3b | |
parent | Display time and battery percent in modeline (diff) | |
download | mmosmacs-749685b09f75578572c69a9ecbc901ed3eb71220.tar.gz mmosmacs-749685b09f75578572c69a9ecbc901ed3eb71220.tar.bz2 mmosmacs-749685b09f75578572c69a9ecbc901ed3eb71220.zip |
Add date and formatting to `display-time-mode`
-rw-r--r-- | init.el | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -289,11 +289,7 @@ | |||
289 | ;; --------------------------------- | 289 | ;; --------------------------------- |
290 | 290 | ||
291 | ;; Display time in modeline | 291 | ;; Display time in modeline |
292 | (defvar mm/display-time-format-string "%H:%M" | 292 | (setq display-time-default-load-average nil) |
293 | "Time format for `display-time-mode'.") | ||
294 | |||
295 | (setq display-time-format mm/display-time-format-string | ||
296 | display-time-default-load-average nil) | ||
297 | 293 | ||
298 | (defface mm/display-time-face | 294 | (defface mm/display-time-face |
299 | '((((type x w32 mac)) | 295 | '((((type x w32 mac)) |
@@ -301,12 +297,15 @@ | |||
301 | "Face used to display the time in the modeline.") | 297 | "Face used to display the time in the modeline.") |
302 | 298 | ||
303 | (setq display-time-string-forms | 299 | (setq display-time-string-forms |
304 | '((propertize (concat " " 24-hours ":" minutes " ") | 300 | '((propertize (concat |
301 | "[ " | ||
302 | (format-time-string "%Y-%m-%d" (current-time)) | ||
303 | " ]" | ||
304 | "[ " 24-hours ":" minutes " ]") | ||
305 | 'face 'mm/display-time-face))) | 305 | 'face 'mm/display-time-face))) |
306 | 306 | ||
307 | (display-time-mode) | 307 | (display-time-mode) |
308 | 308 | ||
309 | |||
310 | ;; Display battery percentage in modeline | 309 | ;; Display battery percentage in modeline |
311 | (display-battery-mode) | 310 | (display-battery-mode) |
312 | 311 | ||