aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2020-04-09 13:17:05 -0700
committerGravatar Tom Willemse2020-04-09 13:17:05 -0700
commit69aec39c5dd6c75b6c10d511bd557eea656cd888 (patch)
treea2e1d8441b7e0683696989233f994e42030b4a5e
parent734d5764f8c134037173fce7984523251ddfbd79 (diff)
downloademacs-config-69aec39c5dd6c75b6c10d511bd557eea656cd888.tar.gz
emacs-config-69aec39c5dd6c75b6c10d511bd557eea656cd888.zip
Diminish auto-revert-mode to 
-rw-r--r--oni-gui.el8
-rw-r--r--test/integration/oni-gui.bats21
2 files changed, 27 insertions, 2 deletions
diff --git a/oni-gui.el b/oni-gui.el
index df72750..babc4d1 100644
--- a/oni-gui.el
+++ b/oni-gui.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2020.0409.131343
+;; Version: 2020.0409.131646
;; Package-Requires: (oni-ui oni-hydra yoshi-theme diminish)
;; This program is free software; you can redistribute it and/or modify
@@ -31,6 +31,7 @@
(set-face-font 'variable-pitch "Comic Neue-14")
(defconst oni-gui-isearch-icon ?)
+(defconst oni-gui-arev-icon ?)
(defun oni-gui-setup-fontsets (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 oni-gui-arev-icon font-awesome frame))
(let ((dejavu-sans-mono "DejaVu Sans Mono"))
(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
(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)
"
diff --git a/test/integration/oni-gui.bats b/test/integration/oni-gui.bats
index 40a14f0..85aaf96 100644
--- a/test/integration/oni-gui.bats
+++ b/test/integration/oni-gui.bats
@@ -29,3 +29,24 @@
[[ "$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" ]]
+}