summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbenjamin <benjamin.lindqvist@gmail.com>2018-01-17 20:51:19 +0100
committerbenjamin <benjamin.lindqvist@gmail.com>2018-01-17 20:51:19 +0100
commit10c69fe7bbfcfdfefbc954b7ed7b1c84cf154b1a (patch)
tree368a8e78c2a21594d581f28fca4a2d5c5ee66875
parent8d794c8829c210f649eec2696f66a6dfb3d5e3b5 (diff)
Added some default faces and generally made it slightly easier to customize
-rw-r--r--README.md9
-rw-r--r--feebleline.el27
-rw-r--r--scrot2.pngbin0 -> 237180 bytes
3 files changed, 29 insertions, 7 deletions
diff --git a/README.md b/README.md
index c79c5d4..669c018 100644
--- a/README.md
+++ b/README.md
@@ -24,5 +24,10 @@ version supports it, just place the following in your init file:
Otherwise, do (feebleline-mode t) instead, but be warned that I'm not sure
if it will look good.
-Screenshot:
-![Alt text](scrot1.png?raw=true "Screenshot1")
+Note: Code graciously improved by *Kungsgeten*. I tweaked it a little bit more
+to make it easier to customize colors etc and defined some default faces. If
+anyone has any ideas for nicer default faces, let me know and I'll consider
+them!
+
+New screenshot :
+![Alt text](scrot2.png?raw=true "Screenshot2")
diff --git a/feebleline.el b/feebleline.el
index ce70be6..c72c942 100644
--- a/feebleline.el
+++ b/feebleline.el
@@ -57,18 +57,35 @@
(require 'advice)
(defvar feebleline/mode-line-format-default)
(defvar feebleline/timer)
+
+(defface feebleline-time-face '((t :inherit 'default :foreground "#73d217"))
+ "Feebleline timestamp face."
+ :group 'feebleline-mode)
+(defface feebleline-linum-face '((t :inherit 'default))
+ "Feebleline linum face."
+ :group 'feebleline-mode)
+(defface feebleline-filename-face '((t :foreground "#fce94e"))
+ "Feebleline filename face."
+ :group 'feebleline-mode)
+
+;; Note: ugly parentheses, for the simple reason that it makes it easier to
+;; transpose, add and comment out lines.
(defvar feebleline-mode-line-text
- '(("[%s] " ((format-time-string "%H:%M:%S")) (face font-lock-comment-face))
- ("%s/%s " ((string-to-number (format-mode-line "%l"))
- (current-column)))
- ("@ %s " ((buffer-file-name))))
+ '(
+ ("[%s] " ((format-time-string "%H:%M:%S")) (face feebleline-time-face))
+ ("(%s" ((string-to-number (format-mode-line "%l"))) (face feebleline-linum-face))
+ ("%s" ("," ) (face default))
+ ("%s) " ((current-column)) (face feebleline-linum-face))
+ ("%s" ("") (face default))
+ ("%s " ((buffer-file-name)) (face feebleline-filename-face))
+ )
"Each element is a list with the following format:
(FORMAT-STRING FORMAT-ARGS PROPS)
FORMAT-STRING will be used as the first argument to `format', and
FORMAT-ARGS (a list) will be expanded as the rest of `format'
-arguments. If PROPS is given, it should be a list which will be
+arguments. If PROPS is given, it should be a list which will be
sent to `add-text-properties'.")
(defun feebleline-default-settings ()
diff --git a/scrot2.png b/scrot2.png
new file mode 100644
index 0000000..8c23023
--- /dev/null
+++ b/scrot2.png
Binary files differ