mirror of
https://github.com/librephoenix/nixos-config
synced 2025-07-06 06:52:13 +05:30
Experimenting with org-krita
This commit is contained in:
parent
9eccb97326
commit
f4c52cc68e
3 changed files with 74 additions and 2 deletions
|
@ -434,6 +434,30 @@ same directory as the org-buffer and insert a link to this file."
|
|||
))
|
||||
(openwith-mode 1)))
|
||||
|
||||
(add-load-path! "~/.emacs.d/org-krita")
|
||||
(require 'org-krita)
|
||||
(add-hook 'org-mode-hook 'org-krita-mode)
|
||||
|
||||
(defun org-krita-show-link (link)
|
||||
(org-krita-hide-link link)
|
||||
(let* ((start (org-element-property :begin link))
|
||||
(end (org-element-property :end link))
|
||||
(overlay (make-overlay (+ start 0) (+ end 0)))
|
||||
(kra-path (org-element-property :path link)))
|
||||
(overlay-put overlay 'display (create-image (org-krita-extract-png kra-path) 'png t :scale 0.5))
|
||||
(push (cons kra-path overlay) org-krita-overlays)))
|
||||
|
||||
(defun org-krita-edit (path &optional full-mode)
|
||||
"Edit given PATH in krita canvasonly mode.
|
||||
|
||||
If FULL-MODE is not null, run full krita."
|
||||
(let ((kra-path (expand-file-name path)))
|
||||
(when (f-exists-p kra-path)
|
||||
(if full-mode
|
||||
(call-process org-krita-executable nil 0 nil kra-path)
|
||||
(call-process org-krita-executable nil 0 nil kra-path))
|
||||
(org-krita-add-watcher kra-path))))
|
||||
|
||||
(defun org-copy-link-to-clipboard-at-point ()
|
||||
"Copy current link at point into clipboard (useful for images and links)"
|
||||
;; Remember to press C-g to kill this foreground process if it hangs!
|
||||
|
@ -956,6 +980,8 @@ same directory as the org-buffer and insert a link to this file."
|
|||
'(org-agenda-date-weekend :ineherit outline-2 :height 1.15)
|
||||
'(org-agenda-date-weekend-today :inherit outline-4 :height 1.15)
|
||||
'(org-super-agenda-header :inherit custom-button :weight bold :height 1.05)
|
||||
'(link :foreground unspecified :underline nil :background "#46354a")
|
||||
'(org-link :foreground unspecified)
|
||||
)
|
||||
|
||||
;; Toggle completed entries function
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue