summaryrefslogtreecommitdiff
path: root/.config/emacs/bd-mode-and-themes.el
diff options
context:
space:
mode:
Diffstat (limited to '.config/emacs/bd-mode-and-themes.el')
-rw-r--r--.config/emacs/bd-mode-and-themes.el26
1 files changed, 14 insertions, 12 deletions
diff --git a/.config/emacs/bd-mode-and-themes.el b/.config/emacs/bd-mode-and-themes.el
index 7cdc196..369b8cf 100644
--- a/.config/emacs/bd-mode-and-themes.el
+++ b/.config/emacs/bd-mode-and-themes.el
@@ -7,6 +7,7 @@
;;;; icon components for filename and git status
(use-package all-the-icons
+ :demand t
:init
(defun modeline-buffer-name ()
"Return 'buffer-name' with proper spacing and icon."
@@ -28,6 +29,11 @@
(format "%s"
(propertize (git-vc-modeline) 'face 'shadow))))
"Formats the checked out git repository.")
+ (defvar-local bd/emms-mode-line
+ '(:eval (when (and (mode-line-window-selected-p) emms-mode-line-string)
+ (format "%s %s" emms-mode-line-string
+ emms-playing-time-string)))
+ "Formats the currently playing emms track.")
:config
(setq emms-mode-line-icon-before-format (format "%s" (all-the-icons-fileicon "owl"))
emms-mode-line-icon-enabled-p t))
@@ -41,8 +47,7 @@
'(:eval (when (and (ednc-notifications) (mode-line-window-selected-p))
(format " %s %s" (all-the-icons-material "notifications_active")
(propertize (get-num-notifications) 'face 'error))))
- "Formats the notification number.")
- :config
+ "Formats the notification number.")
(ednc-mode))
(defun test ()
@@ -54,12 +59,11 @@
display-time-default-load-average nil)
(display-time)
-(defvar-local bd/misc-mode-line
+(defvar-local bd/time-mode-line
'(:eval
(when (mode-line-window-selected-p)
- global-mode-string))
- "Displays misc mode line content (emms, time, etc.)
-only in the selected buffer.")
+ display-time-string))
+ "displays current time and date in selected window.")
(defun mode-line-fill (reserve)
"Return empty space, leaving RESERVE space on the right."
@@ -70,9 +74,6 @@ only in the selected buffer.")
(propertize " "
'display `((space :align-to (- (+ right right-fringe right-margin) ,reserve)))))
-;;;; pad out space for time (this method is probably horrendous)
-(insert-into-list global-mode-string (mode-line-fill 21) (cl-position 'display-time-string global-mode-string))
-
(dolist (construct '(bd/buffer-identification-mode-line
bd/vc-mode-line
bd/misc-mode-line))
@@ -92,8 +93,9 @@ only in the selected buffer.")
bd/notify-mode-line
bd/vc-mode-line
" "
- bd/misc-mode-line
- (mode-line-fill 3)))
+ bd/emms-mode-line
+ (mode-line-fill 21)
+ bd/time-mode-line))
;;;; remove mode-line-clutter
(define-minor-mode minor-mode-blackout-mode
@@ -126,7 +128,7 @@ only in the selected buffer.")
;;;; true transparency
;; (add-to-list 'default-frame-alist '(alpha-background . 60))
-(add-to-list 'default-frame-alist '(alpha . (72 . 72)))
+(add-to-list 'default-frame-alist '(alpha . (90 . 90)))
(defun set-frame-alpha (value)
"Sets the transparency of the frame background. 0=transparent/100=opaque"