diff options
author | jao <jao@gnu.org> | 2025-09-21 19:53:57 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2025-09-21 19:53:57 +0100 |
commit | 6ad38bd07671c171d2434f1fd5f5581604816906 (patch) | |
tree | d8c8949bc6e35a6f195996078f508ba9e0c05337 | |
parent | 9007494f421bcf6c5f0f66d6352d3cc9f3704d94 (diff) | |
download | elibs-6ad38bd07671c171d2434f1fd5f5581604816906.tar.gz elibs-6ad38bd07671c171d2434f1fd5f5581604816906.tar.bz2 |
jao-mode-line fixes
-rw-r--r-- | init.el | 19 | ||||
-rw-r--r-- | lib/eos/jao-mode-line.el | 13 |
2 files changed, 18 insertions, 14 deletions
@@ -531,14 +531,6 @@ (line-number-mode -1) (column-number-mode -1) -;;;; jao-mode-line -(defvar jao-mode-line-in-minibuffer (jao-is-linux)) - -(use-package jao-mode-line - :commands (jao-mode-line-add-to-minibuffer-left - jao-mode-line-add-to-minibuffer-right - jao-mode-line-remove-from-minibuffer)) - ;;;; time display (setq world-clock-list '(("Europe/London" "Edinburgh") @@ -569,7 +561,12 @@ (seconds-to-time (/ v 1000.0)))))) ;;;; mode line toggle +(defvar jao-mode-line-in-minibuffer (jao-is-linux)) + (use-package jao-mode-line + :commands (jao-mode-line-add-to-minibuffer-left + jao-mode-line-add-to-minibuffer-right + jao-mode-line-remove-from-minibuffer) :init (when (and window-system (not jao-mode-line-in-minibuffer)) (add-to-list 'after-make-frame-functions #'jao-mode-line-hide-inactive) @@ -1687,7 +1684,7 @@ ;;; Global transients (defun jao-list-packages () (interactive) - (jao-when-linux (jao-afio-goto-scratch)) + (jao-afio-goto-scratch t) (package-list-packages)) (defun jao-window-system-p () @@ -1714,6 +1711,10 @@ ("/" "open note" jao-org-notes-open) ("\\" "open note by tags" jao-org-notes-consult-tags) ("g" "ripgrep notes" jao-org-notes-consult-ripgrep)] + ["Mode line" + ("ma" "toggle active" jao-mode-line-toggle) + ("mi" "toggle inactive" jao-mode-line-toggle-inactive) + ("mf" "readjust faces" jao-mode-line-adjust-faces)] ["Network" ("s" "ssh" jao-ssh) ("r" "r2e" jao-r2e)] diff --git a/lib/eos/jao-mode-line.el b/lib/eos/jao-mode-line.el index e4f64c0..659516b 100644 --- a/lib/eos/jao-mode-line.el +++ b/lib/eos/jao-mode-line.el @@ -1,6 +1,6 @@ ;;; jao-mode-line.el --- mode-line info -*- lexical-binding: t; -*- -;; Copyright (C) 2022 jao +;; Copyright (C) 2022, 2025 jao ;; Author: jao <mail@jao.io> ;; Keywords: convenience @@ -31,7 +31,7 @@ ;;;; mode line toggle (defun jao-mode-line--face-height (face &optional all) (let* ((h (face-attribute face :height (window-frame))) - (nh (if (eq 'unspecified h) 1 'unspecified))) + (nh (if (eq 'unspecified h) 10 'unspecified))) (set-face-attribute face (when (not all) (window-frame)) :height nh))) (defun jao-mode-line--set-inactive-face (x frame) @@ -41,7 +41,7 @@ ;;;###autoload (defun jao-mode-line-toggle (&optional all) (interactive "P") - (jao-mode-line--face-height 'mode-line all)) + (jao-mode-line--face-height 'mode-line-active all)) ;;;###autoload (defun jao-mode-line-toggle-inactive (&optional all) @@ -127,9 +127,12 @@ (if inactive jao-mode-line--inactive-face jao-mode-line--face))) (defun jao-mode-line-adjust-faces () - (let ((bg (and (display-graphic-p) (frame-parameter nil 'background-color))) + (interactive) + (let ((bg (and (display-graphic-p) + (frame-parameter nil 'background-color))) (ol (and (display-graphic-p) jao-minibuffer-active-buffer-line-color)) - (ul (and (display-graphic-p) jao-minibuffer-inactive-buffer-line-color))) + (ul (and (display-graphic-p) + jao-minibuffer-inactive-buffer-line-color))) (jao-mode-line--extract-face nil) (jao-mode-line--extract-face t) (set-face-attribute 'mode-line nil :box nil :height 1 |