Forked org-krita

This commit is contained in:
Emmet 2024-04-13 15:01:51 -05:00
parent 46387c6f57
commit 7888439a8d
4 changed files with 10 additions and 48 deletions

View file

@ -760,15 +760,15 @@
"org-krita": {
"flake": false,
"locked": {
"lastModified": 1619935377,
"narHash": "sha256-+HI8P0/LI8gdiCD7OiPKTAtLKrPt0REnQ+6oblHSHzU=",
"owner": "lepisma",
"lastModified": 1713037764,
"narHash": "sha256-EHJwe3G/k5/UWFfY+vEkCdKvKNCK7Oh3fFKgMUa87lw=",
"owner": "librephoenix",
"repo": "org-krita",
"rev": "7e334951b8de8f2f1c8cbe5068e7dfe6b9e9808f",
"rev": "6b85cf06f17dfcf9daeb6e045caea6df882bc4ff",
"type": "github"
},
"original": {
"owner": "lepisma",
"owner": "librephoenix",
"repo": "org-krita",
"type": "github"
}

View file

@ -123,7 +123,6 @@
modules = [
(./. + "/profiles" + ("/" + systemSettings.profile)
+ "/home.nix") # load home.nix from selected PROFILE
# inputs.nix-flatpak.homeManagerModules.nix-flatpak # Declarative flatpaks
];
extraSpecialArgs = {
# pass config variables from above
@ -141,7 +140,6 @@
inherit (inputs) org-sliced-images;
inherit (inputs) phscroll;
inherit (inputs) mini-frame;
#inherit (inputs) nix-flatpak;
inherit (inputs) stylix;
};
};
@ -230,7 +228,7 @@
flake = false;
};
org-krita = {
url = "github:lepisma/org-krita";
url = "github:librephoenix/org-krita";
flake = false;
};
org-sliced-images = {

View file

@ -437,26 +437,8 @@ same directory as the org-buffer and insert a link to this file."
(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))))
(setq org-krita-extract-filename "preview.png")
(setq org-krita-scale 1)
(defun org-copy-link-to-clipboard-at-point ()
"Copy current link at point into clipboard (useful for images and links)"

View file

@ -514,26 +514,8 @@ same directory as the org-buffer and insert a link to this file."
(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))))
(setq org-krita-extract-filename "preview.png")
(setq org-krita-scale 1)
#+END_SRC
*** Copy Links/Files into Clipboard