summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbd <bdunahu@colostate.edu>2024-03-25 01:47:50 -0600
committerbd <bdunahu@colostate.edu>2024-03-25 01:47:50 -0600
commit69aaa9077b9e8aa575ae5681f82e019e8c34ee18 (patch)
tree7293fed240e50eef6a50f05ec775db8c70312c0d
parentd20a4df59b303e36dc0311b4b6fe74343c2618ee (diff)
Allow org-timer to be displayed on modeline
-rw-r--r--.config/emacs/modules/bd--modeline.el16
-rw-r--r--.config/guix/modules/shell.scm3
2 files changed, 16 insertions, 3 deletions
diff --git a/.config/emacs/modules/bd--modeline.el b/.config/emacs/modules/bd--modeline.el
index 5900173..3104dc3 100644
--- a/.config/emacs/modules/bd--modeline.el
+++ b/.config/emacs/modules/bd--modeline.el
@@ -61,6 +61,14 @@
(when (mode-line-window-selected-p)
mode-line-position)))
+;;;; timers
+(defvar-local bd/timer-mode-line
+ '(:eval
+ (when (mode-line-window-selected-p)
+ (if (equal org-timer-start-time nil)
+ " " ;; no timer, no display
+ org-timer-mode-line-string))))
+
;;;; git
(defun git-vc-modeline ()
(let ((branch (mapconcat 'concat (cdr (split-string vc-mode "[:-]")) "-")))
@@ -91,7 +99,9 @@
(dolist (construct '(bd/time-mode-line
bd/buffer-identification-mode-line
bd/vc-mode-line
- bd/emms-mode-line))
+ bd/emms-mode-line
+ bd/line-position
+ bd/timer-mode-line))
(put construct 'risky-local-variable t))
@@ -108,7 +118,9 @@
bd/vc-mode-line
" "
bd/emms-mode-line
- (mode-line-fill 34)
+ (mode-line-fill 46)
+ bd/timer-mode-line
+ " "
bd/line-position
" "
bd/time-mode-line))
diff --git a/.config/guix/modules/shell.scm b/.config/guix/modules/shell.scm
index dccb723..23acb41 100644
--- a/.config/guix/modules/shell.scm
+++ b/.config/guix/modules/shell.scm
@@ -24,8 +24,9 @@
("ytta" . "yt-dlp --extract-audio --format bestaudio/best")
("yttv" . "yt-dlp -f b")))
- ;; converts above aliases into eshell aliases automatically
+
(bashrc (list (plain-file "bashrc" "
+# converts above aliases into eshell aliases automatically
alias | sed -E \"s/^alias ([^=]+)='(.*)'$/alias \\1 \\2 \\$*/g; s/'\\\\\\''/'/g;\" >~/.config/emacs/eshell/alias
")))
(environment-variables