Diminish auto-revert-mode to
This commit is contained in:
parent
734d5764f8
commit
69aec39c5d
2 changed files with 27 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 2020.0409.131343
|
;; Version: 2020.0409.131646
|
||||||
;; Package-Requires: (oni-ui oni-hydra yoshi-theme diminish)
|
;; Package-Requires: (oni-ui oni-hydra yoshi-theme diminish)
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -31,6 +31,7 @@
|
||||||
(set-face-font 'variable-pitch "Comic Neue-14")
|
(set-face-font 'variable-pitch "Comic Neue-14")
|
||||||
|
|
||||||
(defconst oni-gui-isearch-icon ?)
|
(defconst oni-gui-isearch-icon ?)
|
||||||
|
(defconst oni-gui-arev-icon ?)
|
||||||
|
|
||||||
(defun oni-gui-setup-fontsets (frame)
|
(defun oni-gui-setup-fontsets (frame)
|
||||||
"Setup fontsets for FRAME.
|
"Setup fontsets for FRAME.
|
||||||
|
@ -48,7 +49,8 @@ If FRAME is nil, they’re set for the current frame."
|
||||||
(set-fontset-font t ? font-awesome frame)
|
(set-fontset-font t ? font-awesome frame)
|
||||||
(set-fontset-font t ? font-awesome frame)
|
(set-fontset-font t ? font-awesome frame)
|
||||||
(set-fontset-font t ? font-awesome frame)
|
(set-fontset-font t ? font-awesome frame)
|
||||||
(set-fontset-font t ? font-awesome frame))
|
(set-fontset-font t ? font-awesome frame)
|
||||||
|
(set-fontset-font t oni-gui-arev-icon font-awesome frame))
|
||||||
(let ((dejavu-sans-mono "DejaVu Sans Mono"))
|
(let ((dejavu-sans-mono "DejaVu Sans Mono"))
|
||||||
(set-fontset-font t ?◉ dejavu-sans-mono frame)
|
(set-fontset-font t ?◉ dejavu-sans-mono frame)
|
||||||
(set-fontset-font t ?○ dejavu-sans-mono frame)
|
(set-fontset-font t ?○ dejavu-sans-mono frame)
|
||||||
|
@ -57,6 +59,8 @@ If FRAME is nil, they’re set for the current frame."
|
||||||
|
|
||||||
(with-eval-after-load 'isearch
|
(with-eval-after-load 'isearch
|
||||||
(diminish 'isearch-mode (string ?\s oni-gui-isearch-icon)))
|
(diminish 'isearch-mode (string ?\s oni-gui-isearch-icon)))
|
||||||
|
(with-eval-after-load 'autorevert
|
||||||
|
(diminish 'auto-revert-mode (string ?\s oni-gui-arev-icon)))
|
||||||
|
|
||||||
(defhydra oni-gui-hydra (:color teal :hint nil)
|
(defhydra oni-gui-hydra (:color teal :hint nil)
|
||||||
"
|
"
|
||||||
|
|
|
@ -29,3 +29,24 @@
|
||||||
|
|
||||||
[[ "$output" == *"t" ]]
|
[[ "$output" == *"t" ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "Opening emacs diminishes auto-revert-mode" {
|
||||||
|
run emacs -batch -l package -f package-initialize \
|
||||||
|
-eval "(prin1 (string= (string ?\s oni-gui-arev-icon)
|
||||||
|
(car (alist-get 'auto-revert-mode minor-mode-alist))))"
|
||||||
|
|
||||||
|
echo "$output"
|
||||||
|
|
||||||
|
[[ "$output" == *"t" ]]
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "Reloading autorevert diminishes auto-revert-mode" {
|
||||||
|
run emacs -batch -l package -f package-initialize \
|
||||||
|
-eval "(load-library \"autorevert\")" \
|
||||||
|
-eval "(prin1 (string= (string ?\s oni-gui-arev-icon)
|
||||||
|
(car (alist-get 'auto-revert-mode minor-mode-alist))))"
|
||||||
|
|
||||||
|
echo "$output"
|
||||||
|
|
||||||
|
[[ "$output" == *"t" ]]
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue