add missing libs and update settings to new versions

This commit is contained in:
2022-01-05 10:56:16 +01:00
parent c781a5becb
commit 5068bab121
34 changed files with 7215 additions and 124 deletions

View File

@@ -23,6 +23,10 @@
:load-path (lambda() (concat config-dir "lisp/biblio"))
:defer t) ;; used by org-ref
(use-package citeproc
:load-path (lambda() (concat config-dir "lisp/citeproc"))
:defer t) ;; used by org-ref
(use-package org-ref ;; used with some preamble defs and \printbibliography (biblatex/biber, no html export), see also ox-bibtex
:load-path (lambda() (concat config-dir "lisp/org-ref"))
:after (org)

View File

@@ -208,6 +208,7 @@ DISPLAY-START: `integer', e.g. 3820"
"Init info with packages loaded and init time."
(setq dashboard-startup-banner 'logo)
(setq dashboard-set-navigator t)
(setq dashboard-page-separator "\n\f\n") ;; \f requires page-break-lines-mode
;; (setq dashboard-navigator-buttons ;; Format: "(icon title help action face prefix suffix)"
;; (list (list ;; line1
;; ;; "☆" "Star" "Show stars" (lambda (&rest _) (show-stars)) warning "[" "]")
@@ -215,101 +216,47 @@ DISPLAY-START: `integer', e.g. 3820"
;; )))
(require 'all-the-icons)
(defun dashboard-navigator-buttons-func ()
;; Format: "(icon title help action face prefix suffix)"
`(( ;; views
("" "Custom Views:" "custom views" nil default "" "")
(,(all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.1)
"ELisp" "my-view-elisp" (lambda (&rest _) (my-tab-view-elisp)))
(,(all-the-icons-alltheicon "python" :height 1.0 :v-adjust 0.0)
"Python" "my-view-python" (lambda (&rest _) (my-tab-view-python)))
(,(all-the-icons-alltheicon "script" :height 1.0 :v-adjust 0.0)
"Shell" "my-view-shell" (lambda (&rest _) (my-tab-view-shell)))
(,(all-the-icons-octicon "file-media" :height 1.0 :v-adjust 0.0)
"Gnuplot" "my-view-gnuplot" (lambda (&rest _) (my-tab-view-gnuplot)))
(,(all-the-icons-octicon "file-pdf" :height 1.0 :v-adjust 0.0)
"Org PDF" "my-view-org-pdf" (lambda (&rest _) (my-tab-view-org-pdf)))
)
( ;; major modes first line
("" "Major Modes:" "major modes" nil default "" "")
(""
"Deft" "deft" (lambda (&rest _) (deft)))
(""
"EShell" "eshell-mode" (lambda (&rest _) (eshell)))
(""
"Magit" "magit" (lambda (&rest _) (magit)))
(,(all-the-icons-octicon "mail" :height 1.0 :v-adjust 0.0)
"Mu4e" "mu4e" (lambda (&rest _) (mu4e)))
(,(all-the-icons-octicon "mail" :height 1.0 :v-adjust 0.0)
"Notmuch" "notmuch" (lambda (&rest _) (notmuch)))
(""
"Org-Brain" "org-brain-visualize" (lambda (&rest _) (call-interactively 'org-brain-visualize)))
)
( ;; major modes second line
(""
"Org-Drill" "org-drill" (lambda (&rest _) (org-drill)))
(""
"Powershell" "powershell" (lambda (&rest _) (powershell)))
(""
"Shell" "shell" (lambda (&rest _) (shell)))
(""
"Treemacs" "treemacs" (lambda (&rest _) (treemacs)))
)
( ;; line1
;; "☆" "Star" "Show stars" (lambda (&rest _) (show-stars)) warning "[" "]")
(,(all-the-icons-material "help_outline" :height 1.1 :v-adjust -0.15) ;; all-the-icons-octicon "question"
"Help" "?/h" (lambda (&rest _) (describe-mode)) nil) ;; #'show-help
(,(all-the-icons-material "refresh" :height 1.1 :v-adjust -0.15) ;; all-the-icons-octicon "sync"
"Restart" "restart-emacs" (lambda (&rest _) (restart-emacs)) nil)
("" ,(concat "Config: " (my-dashboard-config-update)) "config" (lambda (&rest _) (progn (my-dashboard-config-update) (setq dashboard-navigator-buttons (dashboard-navigator-buttons-func)) (dashboard-refresh-buffer))) default "" "")
)))
;; Format: "(icon title help action face prefix suffix)"
`(
;; line: custom views
(("" "Custom Views:" "custom views" nil default "" "")
(,(all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.1)
"ELisp" "my-view-elisp" (lambda (&rest _) (my-tab-view-elisp)))
(,(all-the-icons-alltheicon "python" :height 1.0 :v-adjust 0.0)
"Python" "my-view-python" (lambda (&rest _) (my-tab-view-python)))
(,(all-the-icons-alltheicon "script" :height 1.0 :v-adjust 0.0)
"Shell" "my-view-shell" (lambda (&rest _) (my-tab-view-shell)))
(,(all-the-icons-octicon "file-media" :height 1.0 :v-adjust 0.0)
"Gnuplot" "my-view-gnuplot" (lambda (&rest _) (my-tab-view-gnuplot)))
(,(all-the-icons-octicon "file-pdf" :height 1.0 :v-adjust 0.0)
"Org PDF" "my-view-org-pdf" (lambda (&rest _) (my-tab-view-org-pdf))))
;; line: major modes 1st
(("" "Major Modes:" "major modes" nil default "" "")
("" "Deft" "deft" (lambda (&rest _) (deft)))
("" "EShell" "eshell-mode" (lambda (&rest _) (eshell)))
("" "Magit" "magit" (lambda (&rest _) (magit)))
(,(all-the-icons-octicon "mail" :height 1.0 :v-adjust 0.0)
"Mu4e" "mu4e" (lambda (&rest _) (mu4e)))
(,(all-the-icons-octicon "mail" :height 1.0 :v-adjust 0.0)
"Notmuch" "notmuch" (lambda (&rest _) (notmuch)))
("" "Org-Brain" "org-brain-visualize" (lambda (&rest _) (call-interactively 'org-brain-visualize))))
;; line: major modes 2nd
(("" "Org-Drill" "org-drill" (lambda (&rest _) (org-drill)))
("" "Powershell" "powershell" (lambda (&rest _) (powershell)))
("" "Shell" "shell" (lambda (&rest _) (shell)))
("" "Treemacs" "treemacs" (lambda (&rest _) (treemacs))))
;; last line
(;; "☆" "Star" "Show stars" (lambda (&rest _) (show-stars)) warning "[" "]")
(,(all-the-icons-material "help_outline" :height 1.1 :v-adjust -0.15) ;; all-the-icons-octicon "question"
"Help" "?/h" (lambda (&rest _) (describe-mode)) nil) ;; #'show-help
(,(all-the-icons-material "refresh" :height 1.1 :v-adjust -0.15) ;; all-the-icons-octicon "sync"
"Restart" "restart-emacs" (lambda (&rest _) (restart-emacs)) nil))))
(setq dashboard-navigator-buttons (dashboard-navigator-buttons-func))
(setq dashboard-items '((recents . 10)
(bookmarks . 5)
;;(projects . 5)
;;(agenda . 5)
(registers . 5)))
;;custom widget
(defun my-widget-item (icon icon-face title title-face help action)
(let ((action (or action #'ignore)))
(widget-create 'item
:tag (concat
(propertize icon 'face `(:inherit
,(get-text-property 0 'face icon)
:inherit
,icon-face))
(propertize " " 'face 'variable-pitch)
(propertize title 'face title-face))
:help-echo help
:action action
:button-face `(:underline nil)
:mouse-face 'highlight
;;:button-prefix (propertize "" 'face 'dashboard-navigator)
;;:button-suffix (propertize "" 'face 'dashboard-navigator)
:format "%[%t%]")))
;; (defun dashboard-insert-custom (list-size)
;; (dashboard-insert-shortcut "v" "Views" t)
;; (when (display-graphic-p)
;; (insert (all-the-icons-material "view_quilt" :height 1.6 :v-adjust -0.25
;; :face 'dashboard-heading))
;; (insert " "))
;; (insert (propertize "Custom views:" 'face 'dashboard-heading))
;; (insert " (v)")
;; (insert " ")
;; (my-widget-item (all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.1)
;; 'all-the-icons-purple "ELisp" 'default "my-view-elisp"
;; (lambda (&rest _) (my-view-elisp)))
;; (insert " ")
;; (my-widget-item (all-the-icons-alltheicon "python" :height 1.0 :v-adjust 0.0)
;; 'all-the-icons-dblue "Python" 'default "my-view-python"
;; (lambda (&rest _) (my-view-python)))
;; (insert " ")
;; (my-widget-item (all-the-icons-octicon "mail" :height 1.0 :v-adjust 0.0)
;; 'all-the-icons-dblue "Notmuch" 'default "notmuch"
;; (lambda (&rest _) (notmuch)))
;; )
;; (add-to-list 'dashboard-item-generators '(custom . dashboard-insert-custom) t)
;; see below add-to-list to dashboard-items
;; `clean-buffer-list'
(defun my-buffer-name-list (&optional special internal)
@@ -342,8 +289,7 @@ If INTERNAL non-nil then include internal buffers."
;; a pre-defined heading icon. This is used to include own icon.
(defun dashboard-insert-heading (heading &optional shortcut suppress-icon)
"Insert a widget HEADING in dashboard buffer, adding SHORTCUT if provided."
(when (and (display-graphic-p)
dashboard-set-heading-icons)
(when (and (display-graphic-p) dashboard-set-heading-icons)
;; Try loading `all-the-icons'
(unless (or (fboundp 'all-the-icons-octicon)
(require 'all-the-icons nil 'noerror))
@@ -372,7 +318,17 @@ If INTERNAL non-nil then include internal buffers."
(insert " "))
(insert (propertize heading 'face 'dashboard-heading))
(if shortcut (insert (format " (%s)" shortcut))))
;; Turn the inserted heading into an overlay, so that we may freely change
;; its name without breaking any of the functions that expect the default name.
;; If there isn't a suitable entry in `dashboard-item-names',
;; we fallback to using HEADING. In that case we still want it to be an
;; overlay to maintain consistent behavior (such as the point movement)
;; between modified and default headings.
(let ((ov (make-overlay (- (point) (length heading)) (point) nil t)))
(overlay-put ov 'display (or (cdr (assoc heading dashboard-item-names)) heading))
(overlay-put ov 'face 'dashboard-heading))
(when shortcut (insert (format " (%s)" shortcut))))
;; overwrite to supress the logic to insert a pre-defined heading
;; icon. This is used to include own icon.
(defmacro my-dashboard-insert-section (section-name list list-size shortcut action &rest widget-params)
@@ -382,20 +338,22 @@ ACTION is theaction taken when the user activates the widget button.
WIDGET-PARAMS are passed to the \"widget-create\" function."
`(progn
(dashboard-insert-heading ,section-name
(if (and ,list dashboard-show-shortcuts) ,shortcut)
t) ;; ADDED
(if (and ,list ,shortcut dashboard-show-shortcuts) ,shortcut)
t) ;; ADDED for the overwritten version, see above
(if ,list
(when (dashboard-insert-section-list
,section-name
(dashboard-subseq ,list 0 ,list-size)
,action
,@widget-params)
(when (and (dashboard-insert-section-list
,section-name
(dashboard-subseq ,list ,list-size)
,action
,@widget-params)
,shortcut)
(dashboard-insert-shortcut ,shortcut ,section-name))
(insert "\n --- No items ---"))))
(insert (propertize "\n --- No items ---" 'face 'dashboard-no-items-face)))))
(defun dashboard-insert-buffers (list-size)
"Add the list of LIST-SIZE items from buffers list.
See also `dashboard-insert-section'."
Example `dashboard-insert-recent'.
See also `dashboard-insert-section' for the sequence of elements."
(when (display-graphic-p)
(insert (all-the-icons-octicon
"versions"

View File

@@ -338,11 +338,11 @@ MSG is a message p-list from mu4e."
(start-process-shell-command "offlineimap"
"*offlineimap*"
"offlineimap -o")
'(lambda (process event)
(notmuch-refresh-all-buffers)
(let ((w (get-buffer-window "*offlineimap*")))
(when w
(with-selected-window w (recenter (window-end)))))))
#'(lambda (process event)
(notmuch-refresh-all-buffers)
(let ((w (get-buffer-window "*offlineimap*")))
(when w
(with-selected-window w (recenter (window-end)))))))
(popwin:display-buffer "*offlineimap*"))
;; add a special buffer config
(add-to-list 'popwin:special-display-config