dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 21feb60c176d6529472285bfbd6078d85451ab42
parent 91274f678f31c7c9048a1622a1615e0b57579ffc
Author: Alexander Balgavy <alexander.balgavy@spaceapplications.com>
Date:   Fri, 27 Oct 2023 20:17:20 +0200

emacs: fix config

Diffstat:
Memacs/config.org | 48++++++++++++++++++++++++------------------------
1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/emacs/config.org b/emacs/config.org @@ -955,35 +955,35 @@ Hide some messages I don't need. (recents . 5) (bookmarks . 5))) - ;; Use my saved quotes in the dashboard (https://alex.balgavy.eu/quotes/) - (dashboard-footer-messages - (if (boundp 'za/my-website-dir) - (let* ((quotes-file (concat za/my-website-dir "content/quotes.md")) - ;; Reformat quotes for display in dashboard - (file-contents (with-temp-buffer - (insert-file-contents quotes-file) - (re-search-forward (rx bol "> ")) - (delete-region (point-min) (pos-bol)) - (goto-char (point-min)) - (save-excursion (replace-regexp (rx bol ">" (* " ") (? "\n")) "")) - (save-excursion (replace-regexp (rx eol "\n") " ")) - (buffer-substring-no-properties (point-min) (point-max)))) - ;; Split file into individual quotes - (quotes (split-string file-contents " --- "))) - ;; Run each quote through fill-region for better display - (require 's) - (mapcar (lambda (quote-line) - (with-temp-buffer - (insert (s-trim quote-line)) - (fill-region (point-min) (point-max)) - (buffer-substring-no-properties (point-min) (point-max)))) - quotes)) - nil)) + :bind (:map dashboard-mode-map ("ss" . za/st) ("sk" . za/st-kill) ("J" . org-clock-goto)) :config + ;; Use my saved quotes in the dashboard (https://alex.balgavy.eu/quotes/) + (when (boundp 'za/my-website-dir) + (setq dashboard-footer-messages + (let* ((quotes-file (concat za/my-website-dir "content/quotes.md")) + ;; Reformat quotes for display in dashboard + (file-contents (with-temp-buffer + (insert-file-contents quotes-file) + (re-search-forward (rx bol "> ")) + (delete-region (point-min) (pos-bol)) + (goto-char (point-min)) + (save-excursion (replace-regexp (rx bol ">" (* " ") (? "\n")) "")) + (save-excursion (replace-regexp (rx eol "\n") " ")) + (buffer-substring-no-properties (point-min) (point-max)))) + ;; Split file into individual quotes + (quotes (split-string file-contents " --- "))) + ;; Run each quote through fill-region for better display + (require 's) + (mapcar (lambda (quote-line) + (with-temp-buffer + (insert (s-trim quote-line)) + (fill-region (point-min) (point-max)) + (buffer-substring-no-properties (point-min) (point-max)))) + quotes)))) (add-to-list 'dashboard-item-generators '(gtd-inbox-counts . dashboard-insert-gtd-inbox-counts))) (defun dashboard-insert-gtd-inbox-counts (list-size)