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

View file

@ -123,7 +123,6 @@
modules = [ modules = [
(./. + "/profiles" + ("/" + systemSettings.profile) (./. + "/profiles" + ("/" + systemSettings.profile)
+ "/home.nix") # load home.nix from selected PROFILE + "/home.nix") # load home.nix from selected PROFILE
# inputs.nix-flatpak.homeManagerModules.nix-flatpak # Declarative flatpaks
]; ];
extraSpecialArgs = { extraSpecialArgs = {
# pass config variables from above # pass config variables from above
@ -141,7 +140,6 @@
inherit (inputs) org-sliced-images; inherit (inputs) org-sliced-images;
inherit (inputs) phscroll; inherit (inputs) phscroll;
inherit (inputs) mini-frame; inherit (inputs) mini-frame;
#inherit (inputs) nix-flatpak;
inherit (inputs) stylix; inherit (inputs) stylix;
}; };
}; };
@ -230,7 +228,7 @@
flake = false; flake = false;
}; };
org-krita = { org-krita = {
url = "github:lepisma/org-krita"; url = "github:librephoenix/org-krita";
flake = false; flake = false;
}; };
org-sliced-images = { 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") (add-load-path! "~/.emacs.d/org-krita")
(require 'org-krita) (require 'org-krita)
(add-hook 'org-mode-hook 'org-krita-mode) (add-hook 'org-mode-hook 'org-krita-mode)
(setq org-krita-extract-filename "preview.png")
(defun org-krita-show-link (link) (setq org-krita-scale 1)
(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 () (defun org-copy-link-to-clipboard-at-point ()
"Copy current link at point into clipboard (useful for images and links)" "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") (add-load-path! "~/.emacs.d/org-krita")
(require 'org-krita) (require 'org-krita)
(add-hook 'org-mode-hook 'org-krita-mode) (add-hook 'org-mode-hook 'org-krita-mode)
(setq org-krita-extract-filename "preview.png")
(defun org-krita-show-link (link) (setq org-krita-scale 1)
(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))))
#+END_SRC #+END_SRC
*** Copy Links/Files into Clipboard *** Copy Links/Files into Clipboard