summaryrefslogtreecommitdiff
path: root/emacs/site-lisp
diff options
context:
space:
mode:
authorThomas Ulmer <thomasmulmer02@gmail.com>2026-01-13 19:12:23 -0800
committerThomas Ulmer <thomasmulmer02@gmail.com>2026-01-13 19:12:23 -0800
commitd65d477b16a553cbf80011ccf96c980a65970e6c (patch)
tree7e023389598f6f03d19859d41749be820d55c44b /emacs/site-lisp
parent3c54c06a71c731f585b3780642d19c344ea8885d (diff)
emacs: organize and document init
Diffstat (limited to 'emacs/site-lisp')
-rwxr-xr-xemacs/site-lisp/single-header.el26
1 files changed, 14 insertions, 12 deletions
diff --git a/emacs/site-lisp/single-header.el b/emacs/site-lisp/single-header.el
index 9d5086b..dc65335 100755
--- a/emacs/site-lisp/single-header.el
+++ b/emacs/site-lisp/single-header.el
@@ -4,11 +4,13 @@
;; Package-Requires: ((ednc) (battery) (s) (dash))
;; Package-Version 1.0
-(require 'ednc)
(require 'battery)
(require 's)
(require 'dash)
+(use-package ednc ; make emacs a dbus notify reciever
+ )
+
;;; Commentary:
;;;
@@ -98,19 +100,19 @@ arg, dismiss all the notifications."
"Generates the mode line string that contains all the info to the right."
(let ((str (concat
(single-header--with-face (battery-format "[%b%p%%] " (and battery-status-function (funcall battery-status-function)))
- :weight 'bold)
+ :weight 'bold)
(single-header--with-face (let* ((mi (memory-info))
- (tm (float (car mi)))
- (fm (float (cadr mi)))
- (ts (float (caddr mi)))
- (fs (float (cadddr mi))))
- (format "{%.2f %.2f} " (- 1 (/ fm tm)) (- 1 (/ fs ts))))
- :foreground "#00ced1")
+ (tm (float (car mi)))
+ (fm (float (cadr mi)))
+ (ts (float (caddr mi)))
+ (fs (float (cadddr mi))))
+ (format "{%.2f %.2f} " (- 1 (/ fm tm)) (- 1 (/ fs ts))))
+ :foreground "#00ced1")
(single-header--with-face (format "<%03.2f> " (car (load-average 1)))
- :foreground "#da70d6")
+ :foreground "#da70d6")
(format-time-string "%a, %b %+4Y-%0m-%0d ")
(single-header--with-face (format-time-string "%R")
- :weight 'bold)
+ :weight 'bold)
)))
(single-header--with-face str 'single-header-face)))
@@ -143,7 +145,7 @@ arg, dismiss all the notifications."
(fit-window-to-buffer win 1))
(setq-local window-size-fixed t)
(when
- (fboundp 'window-preserve-size)
+ (fboundp 'window-preserve-size)
(window-preserve-size win nil t))))
(defun single-header--init-frame (&optional frame)
@@ -245,7 +247,7 @@ arg, dismiss all the notifications."
:global t
:init-value nil
:keymap `((,(kbd "M-L d") . single-header-dismiss)
- (,(kbd "M-L t") . single-header-mode))
+ (,(kbd "M-L t") . single-header-mode))
:interactive t
(if (not single-header-mode)
(single-header-delete)