|
|
@@ -34,6 +34,8 @@
|
|
|
org
|
|
|
org-agenda
|
|
|
org-bullets
|
|
|
+ org-brain
|
|
|
+ all-the-icons
|
|
|
)
|
|
|
"The list of Lisp packages required by the chicken-dotfiles layer.
|
|
|
|
|
|
@@ -63,6 +65,44 @@ installed using the Emacs package manager.
|
|
|
recipe. See: https://github.com/milkypostman/melpa#recipe-format"
|
|
|
)
|
|
|
|
|
|
+(defun chicken-dotfiles/init-org-brain()
|
|
|
+ (use-package org-brain
|
|
|
+ :defer t
|
|
|
+ :init
|
|
|
+ (setq org-brain-path "D:/Notes/Brain")
|
|
|
+ :config
|
|
|
+ (setq org-id-locations-file "~/.emacs.d/.org-id-locations")
|
|
|
+ (evil-set-initial-state 'org-brain-visualize-mode 'emacs)
|
|
|
+
|
|
|
+ ;; See https://github.com/Kungsgeten/org-brain#all-the-icons
|
|
|
+ (defun org-brain-insert-resource-icon (link)
|
|
|
+ "Insert an icon, based on content of org-mode LINK."
|
|
|
+ (insert (format "%s "
|
|
|
+ (cond ((string-prefix-p "http" link)
|
|
|
+ (cond ((string-match "wikipedia\\.org" link)
|
|
|
+ (all-the-icons-faicon "wikipedia-w"))
|
|
|
+ ((string-match "github\\.com" link)
|
|
|
+ (all-the-icons-octicon "mark-github"))
|
|
|
+ ((string-match "vimeo\\.com" link)
|
|
|
+ (all-the-icons-faicon "vimeo"))
|
|
|
+ ((string-match "youtube\\.com" link)
|
|
|
+ (all-the-icons-faicon "youtube"))
|
|
|
+ ((string-match "bitbucket\\.org" link)
|
|
|
+ (all-the-icons-faicon "bitbucket"))
|
|
|
+ ((string-match "stackoverflow\\.com" link)
|
|
|
+ (all-the-icons-faicon "stack-overflow"))
|
|
|
+ ((string-match "\\.pdf$" link)
|
|
|
+ (all-the-icons-octicon "file-pdf"))
|
|
|
+ (t
|
|
|
+ (all-the-icons-faicon "globe"))))
|
|
|
+ ((string-prefix-p "brain:" link)
|
|
|
+ (all-the-icons-fileicon "brain"))
|
|
|
+ (t
|
|
|
+ (all-the-icons-icon-for-file link))))))
|
|
|
+
|
|
|
+ (add-hook 'org-brain-after-resource-button-functions #'org-brain-insert-resource-icon)
|
|
|
+ ))
|
|
|
+
|
|
|
(defun chicken-dotfiles/post-init-org-bullets()
|
|
|
(use-package org-bullets
|
|
|
:defer t
|