From d65d477b16a553cbf80011ccf96c980a65970e6c Mon Sep 17 00:00:00 2001 From: Thomas Ulmer Date: Tue, 13 Jan 2026 19:12:23 -0800 Subject: emacs: organize and document init --- emacs/site-lisp/single-header.el | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'emacs/site-lisp') 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) -- cgit v1.2.3