summaryrefslogtreecommitdiff
path: root/time-conf.el
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2021-04-20 09:27:17 +0800
committerJSDurand <mmemmew@gmail.com>2021-04-20 09:27:17 +0800
commita8fed34329cfb2f3095c300d1e910008d7a7b2b1 (patch)
treef6940b0ff43b4547e36826ffb37f25e38b2b3c61 /time-conf.el
parentd5c1b16c18bd78fe33def35cdbfcda30ca07a0a1 (diff)
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.
Diffstat (limited to 'time-conf.el')
-rw-r--r--time-conf.el43
1 files changed, 43 insertions, 0 deletions
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: 李俊緯 <mmemmew@gmail.com>
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; 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