Compare commits

...

3 commits

Author SHA1 Message Date
Emmet 58d3d160f5 Added org-xournalpp with some config tweaks 2024-04-13 19:07:10 -05:00
Emmet d2052d35b5 I don't ever need to move timestamps by month with a single keybind 2024-04-13 18:40:14 -05:00
Emmet 92bf4e21e2 Updated system 2024-04-13 18:39:57 -05:00
5 changed files with 119 additions and 21 deletions

View file

@ -150,11 +150,11 @@
"blocklist-hosts": {
"flake": false,
"locked": {
"lastModified": 1712248646,
"narHash": "sha256-pEiprVaO6CmIJ1qJMQn/y8vHvRQwiQq7CwbhzlneCOA=",
"lastModified": 1712863118,
"narHash": "sha256-c9bYR9z/QojWicJJtBuoDNoWEXvVHSbslGpGJ1/MTz4=",
"owner": "StevenBlack",
"repo": "hosts",
"rev": "a340ebf0b8e9f81476c0ec0b6a9767858aea325c",
"rev": "7bb3d2292994c7a0c42efbd904a0d68e4a6bb8a0",
"type": "github"
},
"original": {
@ -523,11 +523,11 @@
]
},
"locked": {
"lastModified": 1712390667,
"narHash": "sha256-ebq+fJZfobqpsAdGDGpxNWSySbQejRwW9cdiil6krCo=",
"lastModified": 1713019815,
"narHash": "sha256-jzTo97VeKMNfnKw3xU+uiU5C7wtnLudsbwl/nwPLC7s=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "b787726a8413e11b074cde42704b4af32d95545c",
"rev": "8fdf329526f06886b53b94ddf433848a0d142984",
"type": "github"
},
"original": {
@ -633,11 +633,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1712163089,
"narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=",
"lastModified": 1712791164,
"narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fd281bd6b7d3e32ddfa399853946f782553163b5",
"rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5",
"type": "github"
},
"original": {
@ -648,11 +648,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1712310679,
"narHash": "sha256-XgC/a/giEeNkhme/AV1ToipoZ/IVm1MV2ntiK4Tm+pw=",
"lastModified": 1712867921,
"narHash": "sha256-edTFV4KldkCMdViC/rmpJa7oLIU8SE/S35lh/ukC7bg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "72da83d9515b43550436891f538ff41d68eecc7f",
"rev": "51651a540816273b67bc4dedea2d37d116c5f7fe",
"type": "github"
},
"original": {
@ -760,11 +760,11 @@
"org-krita": {
"flake": false,
"locked": {
"lastModified": 1713037764,
"narHash": "sha256-EHJwe3G/k5/UWFfY+vEkCdKvKNCK7Oh3fFKgMUa87lw=",
"lastModified": 1713038273,
"narHash": "sha256-ZoigcRMetn2ZY9uvcR3iLnPsf9ys2rHuUD9yv3+u7KM=",
"owner": "librephoenix",
"repo": "org-krita",
"rev": "6b85cf06f17dfcf9daeb6e045caea6df882bc4ff",
"rev": "9a1d917d2ee0fb7d2403186a0e6a15e23089c9fb",
"type": "github"
},
"original": {
@ -837,6 +837,22 @@
"type": "github"
}
},
"org-xournalpp": {
"flake": false,
"locked": {
"lastModified": 1625233179,
"narHash": "sha256-c0AYWMkBb7wdl7SWTffjWSXwXbq1PGov2vT8A1pdqpQ=",
"owner": "vherrmann",
"repo": "org-xournalpp",
"rev": "c09bd8b99d36c355d632b85ecbffb3b275802381",
"type": "gitlab"
},
"original": {
"owner": "vherrmann",
"repo": "org-xournalpp",
"type": "gitlab"
}
},
"org-yaap": {
"flake": false,
"locked": {
@ -936,6 +952,7 @@
"org-side-tree": "org-side-tree",
"org-sliced-images": "org-sliced-images",
"org-timeblock": "org-timeblock",
"org-xournalpp": "org-xournalpp",
"org-yaap": "org-yaap",
"phscroll": "phscroll",
"rust-overlay": "rust-overlay",
@ -964,11 +981,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1712369449,
"narHash": "sha256-tbWug3uXPlSm1j0xD80Y3xbP+otT6gLnQo1e/vQat48=",
"lastModified": 1712973993,
"narHash": "sha256-ZJxC6t2K0UAPW+lV+bJ+pAtwbn29eqZQzXLTG54oL+I=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "41b3b080cc3e4b3a48e933b87fc15a05f1870779",
"rev": "a497535d074432133b683dda3a1faa8c8ab587ad",
"type": "github"
},
"original": {
@ -1010,11 +1027,11 @@
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1712154372,
"narHash": "sha256-2HFQm/gpmxtMokn6pInHlTlU7mBONLb3Y1aN8SlY0tc=",
"lastModified": 1713025302,
"narHash": "sha256-za4w2wYt1fg9EdTv5fYLwEqAyHgPmPq88HmlxirXuEk=",
"owner": "danth",
"repo": "stylix",
"rev": "f9b9bc7c8e69942cd2583a3309f86fc5260f1275",
"rev": "83866ed8800ed39519a79ea30b18c8eb21f26080",
"type": "github"
},
"original": {

View file

@ -218,6 +218,10 @@
url = "github:librephoenix/org-krita";
flake = false;
};
org-xournalpp = {
url = "gitlab:vherrmann/org-xournalpp";
flake = false;
};
org-sliced-images = {
url = "github:jcfk/org-sliced-images";
flake = false;

View file

@ -440,6 +440,37 @@ same directory as the org-buffer and insert a link to this file."
(setq org-krita-extract-filename "preview.png")
(setq org-krita-scale 1)
(add-load-path! "~/.emacs.d/org-xournalpp")
(require 'org-xournalpp)
(add-hook 'org-mode-hook 'org-xournalpp-mode)
(setq org-xournalpp-template-getter
'(closure
(t)
nil
(file-truename "~/Templates/template.xopp") ; use my own template
)
)
;; override width to static 250 for now
;; so I don't have massive images in org mode (scrolling not fun)
(defun org-xournalpp--create-image (link refresh)
"Extract svg/png from given LINK and return image.
Regenerate the cached inline image, if REFRESH is true.
If the path from LINK does not exist, nil is returned."
(let ((width 250)
(xopp-path (f-expand (org-element-property :path link))))
(when (f-exists? xopp-path)
(if width
(create-image (org-xournalpp--get-image xopp-path refresh)
org-xournalpp-image-type
nil
:width width)
(create-image (org-xournalpp--get-image xopp-path refresh)
org-xournalpp-image-type
nil)))))
(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!
@ -1010,6 +1041,9 @@ same directory as the org-buffer and insert a link to this file."
("Personal.p" ,(list (all-the-icons-material "person" :height 0.9)) nil nil :ascent center)
))
(defalias 'org-timestamp-down 'org-timestamp-down-day)
(defalias 'org-timestamp-up 'org-timestamp-up-day)
(defun org-categorize-by-roam-db-on-save ()
(interactive)
(when (string= (message "%s" major-mode) "org-mode")

View file

@ -101,6 +101,10 @@ in
source = "${inputs.org-krita}";
};
home.file.".emacs.d/org-xournalpp" = {
source = "${inputs.org-xournalpp}";
};
home.file.".emacs.d/org-sliced-images" = {
source = "${inputs.org-sliced-images}";
};

View file

@ -517,6 +517,38 @@ same directory as the org-buffer and insert a link to this file."
(setq org-krita-extract-filename "preview.png")
(setq org-krita-scale 1)
(add-load-path! "~/.emacs.d/org-xournalpp")
(require 'org-xournalpp)
(add-hook 'org-mode-hook 'org-xournalpp-mode)
(setq org-xournalpp-template-getter
'(closure
(t)
nil
(file-truename "~/Templates/template.xopp") ; use my own template
)
)
;; override width to static 250 for now
;; so I don't have massive images in org mode (scrolling not fun)
(defun org-xournalpp--create-image (link refresh)
"Extract svg/png from given LINK and return image.
Regenerate the cached inline image, if REFRESH is true.
If the path from LINK does not exist, nil is returned."
(let ((width 250)
(xopp-path (f-expand (org-element-property :path link))))
(when (f-exists? xopp-path)
(if width
(create-image (org-xournalpp--get-image xopp-path refresh)
org-xournalpp-image-type
nil
:width width)
(create-image (org-xournalpp--get-image xopp-path refresh)
org-xournalpp-image-type
nil)))))
#+END_SRC
*** Copy Links/Files into Clipboard
#+BEGIN_SRC emacs-lisp :tangle config.el
@ -1173,6 +1205,9 @@ On Wayland, EAF doesn't work.
*** Org Agenda Convenience Functions
#+BEGIN_SRC emacs-lisp :tangle config.el
(defalias 'org-timestamp-down 'org-timestamp-down-day)
(defalias 'org-timestamp-up 'org-timestamp-up-day)
(defun org-categorize-by-roam-db-on-save ()
(interactive)
(when (string= (message "%s" major-mode) "org-mode")
@ -2086,6 +2121,10 @@ in
source = "${inputs.org-krita}";
};
home.file.".emacs.d/org-xournalpp" = {
source = "${inputs.org-xournalpp}";
};
home.file.".emacs.d/org-sliced-images" = {
source = "${inputs.org-sliced-images}";
};