From 9c490d02512b86c95aa9020d000daba947415a74 Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 15 May 2021 00:28:19 +0100 Subject: tweaks for in-buffer mode-line --- gnus.org | 12 +++++++----- init.org | 16 +++++++++++++--- lib/themes/jao-light-theme.el | 4 ++-- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/gnus.org b/gnus.org index 24818e5..4bca3f3 100644 --- a/gnus.org +++ b/gnus.org @@ -243,8 +243,9 @@ (defun jao-gnus--summary-done () (let ((inhibit-message t) (message-log-max nil)) - (jao-gnus--notify) - (save-window-excursion (org-agenda-list)))) + (save-window-excursion + (jao-gnus--notify) + (org-agenda-list)))) (add-hook 'gnus-summary-exit-hook #'jao-gnus--summary-done) @@ -463,12 +464,13 @@ "%%~(max-right 8)~(pad-left 8)&user-date;" "\n")) - (defun jao-gnus--set-summary-line () + (defun jao-gnus--set-summary-line (&optional w) (let* ((d (if jao-gnus-use-three-panes 75 12)) - (w (- (window-width) d))) + (w (- (or w (window-width)) d))) (setq gnus-summary-line-format (format jao-gnus--summary-line-fmt w)))) - (add-hook 'gnus-select-group-hook 'jao-gnus--set-summary-line) + ;; (add-hook 'gnus-select-group-hook 'jao-gnus--set-summary-line) + (jao-gnus--set-summary-line 190) (add-to-list 'nnmail-extra-headers 'Cc) (add-to-list 'nnmail-extra-headers 'BCc) diff --git a/init.org b/init.org index 827da3e..b95a59e 100644 --- a/init.org +++ b/init.org @@ -270,6 +270,10 @@ "%L %r %B (%p%% load, remaining time %t)" battery-mode-line-format " %b%p ")) (display-battery-mode 1) + (setq global-mode-string + (delq 'battery-mode-line-string global-mode-string)) + (with-eval-after-load "jao-minibuffer" + (jao-minibuffer-add-variable 'battery-mode-line-string 80)) #+end_src * Crypto *** PGP, EPG, passwords @@ -479,8 +483,9 @@ (jao-load-org "exwm.org") (setq jao-exwm-enabled-p t) (display-time-mode -1) - (jao-minibuffer-add-mode-line 90) (jao-ednc-setup 95) + ;; (jao-minibuffer-add-mode-line 90) + (jao-toggle-inactive-mode-line t) (exwm-enable) (jao-trisect t) (jao-exwm-xmobar) @@ -650,9 +655,14 @@ *** Mode line format #+begin_src emacs-lisp (setq line-number-display-limit-width 250) - (setq mode-line-position-column-format '(",%c") + (setq mode-line-position-column-format '(" %c") mode-line-position-line-format '(" %l,%c")) - (line-number-mode 1) + (setq mode-line-percent-position + '(" %l" + (circe-chat-target (:eval (format " [%d]" + (length (circe-channel-nicks))))) + (:eval (format "/%d" (line-number-at-pos (point-max)))))) + (line-number-mode -1) (column-number-mode 1) #+end_src *** Mode line time diff --git a/lib/themes/jao-light-theme.el b/lib/themes/jao-light-theme.el index 7772763..e347023 100644 --- a/lib/themes/jao-light-theme.el +++ b/lib/themes/jao-light-theme.el @@ -113,9 +113,9 @@ (magit-diff-context-highlight (c nil yellow) ex) (magit-diff-hunk-heading-highlight (c nil yellow) it bf) (mode-line (c "grey30" dimm-background-3) - :box (:line-width 1 :color "grey90")) + :box (:line-width -1 :color "grey90")) (mode-line-inactive (c "grey40" dimm-background-4) - :box (:line-width 1 :color "grey90")) + :box (:line-width -1 :color "grey90")) (mode-line-buffer-id (~ default) (c dark-blue-2) nit) (mode-line-emphasis (c green nil)) (mode-line-highlight (c green nil)) -- cgit v1.2.3