summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--init.el19
-rw-r--r--lib/eos/jao-mode-line.el13
2 files changed, 18 insertions, 14 deletions
diff --git a/init.el b/init.el
index 3cf563b..643ee89 100644
--- a/init.el
+++ b/init.el
@@ -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