summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2014-02-01 20:04:20 +0100
committerGravatar Tom Willemse2014-02-01 20:04:20 +0100
commitebd7a2ae22bd5a1bff36bbfe7792c03483e752d7 (patch)
treeab989b3f8ecc1b81ac64c08af3f66dfbeb361fbf
parent5efd3c0613c48455a532c87cc680b2636c61c610 (diff)
downloadeshell-fringe-status-ebd7a2ae22bd5a1bff36bbfe7792c03483e752d7.tar.gz
eshell-fringe-status-ebd7a2ae22bd5a1bff36bbfe7792c03483e752d7.zip
Add customization options, extra bitmaps
Allow users to specify how they would like the overlay images to look. Also add 2 images in case people like these, I prefer the arrow myself.
-rw-r--r--eshell-fringe-status.el45
1 files changed, 42 insertions, 3 deletions
diff --git a/eshell-fringe-status.el b/eshell-fringe-status.el
index 7497126..f41f03a 100644
--- a/eshell-fringe-status.el
+++ b/eshell-fringe-status.el
@@ -41,17 +41,39 @@
:group 'eshell
:prefix "eshell-fringe")
+(defcustom eshell-fringe-status-success-bitmap 'efs-arrow-bitmap
+ "The fringe bitmap to use when indicating a succesfull operation.
+
+In combination with the `eshell-fringe-status-success' face this
+determines the look of the fringe indicator."
+ :group 'eshell-fringe-status
+ :type 'symbol)
+
+(defcustom eshell-fringe-status-failure-bitmap 'efs-arrow-bitmap
+ "The fringe bitmap to use when indicating a failed operation.
+
+In combination with the `eshell-fringe-status-failure' face this
+determines the look of the fringe indicator."
+ :group 'eshell-fringe-status
+ :type 'symbol)
+
(defface eshell-fringe-status-success
'((t (:foreground "#00ff00")))
- "Face used to indicate success status."
+ "Face used to indicate success status.
+
+In combination with the `eshell-fringe-status-success-bitmap'
+this determines the look of the fringe indicator."
:group 'eshell-fringe-status)
(defface eshell-fringe-status-failure
'((t (:foreground "#ff0000")))
- "Face used to indicate failed status."
+ "Face used to indicate failed status.
+
+In combination withh the `eshell-fringe-status-failure-bitmap'
+this determines the look of the fringe indicator."
:group 'eshell-fringe-status)
-(define-fringe-bitmap 'efs--arrow-bitmap
+(define-fringe-bitmap 'efs-arrow-bitmap
[#b10000
#b11000
#b11100
@@ -62,6 +84,23 @@
#b11000
#b10000] 9 5 'center)
+(define-fringe-bitmap 'efs-plus-bitmap
+ [#b001100
+ #b001100
+ #b111111
+ #b111111
+ #b001100
+ #b001100] 6 6 'center)
+
+(define-fringe-bitmap 'efs-minus-bitmap
+ [#b111111
+ #b111111] 2 6 'center)
+
+;; efs--depending on command (status)
+(defsubst efs--doc (a b)
+ "Depending on the `eshell-last-command-status' use either A or B."
+ (if (zerop eshell-last-command-status) a b))
+
(defun efs--extend-prompt-regexp ()
"Add a space at the beginning of `eshell-prompt-regexp'.