From a8fed34329cfb2f3095c300d1e910008d7a7b2b1 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Tue, 20 Apr 2021 09:27:17 +0800 Subject: Display battery and time on the modeline. Now I can use Emacs in the full-screen mode. * battery-conf.el (battery-pmset): (durand-battery-pmset): Override the default so that it also offers temperature information. (battery-mode-line-format): (battery-mode-line-limit): (battery-update-interval): (battery-load-low): (battery-load-critical): Some sane defaults. * init.el (durand-battery): (durand-time): Advice to load the configurations and display at the same time. * time-conf.el (display-time-format): (display-time-interval): (display-time-default-load-average): (display-time-mail-directory): (display-time-mail-function): (display-time-use-mail-icon): (display-time-mail-string): (display-time-mail-face): Sane defaults. --- time-conf.el | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 time-conf.el (limited to 'time-conf.el') diff --git a/time-conf.el b/time-conf.el new file mode 100644 index 0000000..4456833 --- /dev/null +++ b/time-conf.el @@ -0,0 +1,43 @@ +;;; time-conf.el --- Display time -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 李俊緯 + +;; Author: 李俊緯 +;; Keywords: convenience, help, calendar, unix + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; Display time on the mode line. + +;;; Code: + +(setq display-time-format "%H:%M %Y-%m-%d") + ;;;; Covered by `display-time-format' +;; (setq display-time-24hr-format t) +;; (setq display-time-day-and-date t) +(setq display-time-interval 60) +(setq display-time-default-load-average nil) +;; NOTE: I don't want to see a mail indicator on the mode line. +(setq display-time-mail-directory nil) +(setq display-time-mail-function nil) +(setq display-time-use-mail-icon nil) +(setq display-time-mail-string nil) +(setq display-time-mail-face nil) + +(add-hook 'after-init-hook #'display-time-mode) + +(provide 'time-conf) +;;; time-conf.el ends here -- cgit v1.2.3-18-g5258