From 9d0d4ce3305c70c6157700a3f95001b69c41c399 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Sat, 28 Jun 2025 15:11:09 +0200 Subject: [PATCH 01/12] =?UTF-8?q?=F0=9F=9A=A7=20(edam)=20First=20developme?= =?UTF-8?q?nt=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 9 +++++++++ packages/edam.el | 23 +++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 packages/edam.el diff --git a/config.org b/config.org index e76f290..570ea4a 100644 --- a/config.org +++ b/config.org @@ -2934,6 +2934,15 @@ API Integration for [[https://linkding.link/][Linkding]]. linkding-user "mmk2410")) #+end_src +* EDAM + +A simple work-in-progress photography DAM in Emacs. + +#+begin_src emacs-lisp +(use-package edam + :load-path "packages/") +#+end_src + * Work For my workplace I have some additional packages and configuration that I keep in an own file. diff --git a/packages/edam.el b/packages/edam.el new file mode 100644 index 0000000..01d5c84 --- /dev/null +++ b/packages/edam.el @@ -0,0 +1,23 @@ +;;; edam.el --- Eamcs DAM -*- lexical-binding: t -*- + +;;; Commentary: +;;; A simple work-in-progress photography DAM in Emacs + +;;; Code: +(require 'dired) + +(defun edam-set-rating-file-at-point (rating) + "Set image RATING." + (interactive "nRating: ") + (let ((args (cond ((= rating 1) "-Rating=1 -RatingPercent=1") + ((= rating 2) "-Rating=2 -RatingPercent=25") + ((= rating 3) "-Rating=3 -RatingPercent=50") + ((= rating 4) "-Rating=4 -RatingPercent=75") + ((= rating 5) "-Rating=5 -RatingPercent=99") + (t (error "Not a valid rating"))))) + (dired-do-shell-command + (concat "exiftool " args) + (dired-get-marked-files)))) + +(provide 'edam) +;;; edam.el ends here From 2bb04f69530f1f1cf25c294c831332b5fb568b08 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Sat, 28 Jun 2025 15:11:58 +0200 Subject: [PATCH 02/12] =?UTF-8?q?=E2=9C=A8=20(tandoor)=20Basic=20Tandoor?= =?UTF-8?q?=20recipe=20manager=20integration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 11 +++++++++++ packages/tandoor.el | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 packages/tandoor.el diff --git a/config.org b/config.org index 570ea4a..8c2dc25 100644 --- a/config.org +++ b/config.org @@ -2934,6 +2934,17 @@ API Integration for [[https://linkding.link/][Linkding]]. linkding-user "mmk2410")) #+end_src +** Tandoor Integration + +API Integration for [[https://tandoor.dev/][Tandoor]]. + +#+begin_src emacs-lisp +(use-package tandoor + :load-path "packages/" + :custom + (tandoor-host "recipes.mmk2410.org")) +#+end_src + * EDAM A simple work-in-progress photography DAM in Emacs. diff --git a/packages/tandoor.el b/packages/tandoor.el new file mode 100644 index 0000000..18416db --- /dev/null +++ b/packages/tandoor.el @@ -0,0 +1,40 @@ +;;; tandoor.el --- Tandoor Integration -*- lexical-binding: t -*- + +;;; Commentary: +;;; Integration with Tandoor. + +;;; Code: +(require 'json) +(require 'plz) + +(defcustom tandoor-host "" + "Hostname of the Tandoor instance." + :type '(string) + :group 'tandoor) + +(defun tandoor--get-api-key () + "Get Tandoor API key from auth store." + (let ((result (auth-source-search :host tandoor-host))) + (if result + (funcall (plist-get (car result) :secret)) + nil))) + +(defun tandoor--build-headers () + "Build headers for Tandoor API request." + `(("Content-Type" . "application/json") + ("Authorization" . ,(concat "Bearer " (tandoor--get-api-key))))) + +(defun tandoor-shopping-list-add-entry (food amount unit) + "Add AMOUNT UNIT FOOD to Tandoor shopping list." + (interactive "sFood to add: \nsAmount: \nsUnit: ") + (plz 'post (concat "https://" tandoor-host "/api/shopping-list-entry/") + :headers (tandoor--build-headers) + :body (json-encode `(("food" ("name" . ,food)) + ("unit" ("name" . ,unit)) + ("amount" . ,amount))) + :as 'string + :then (lambda (res) (message "Entry added successfully.")) + :else (lambda (res) (message "Failed to add entry.")))) + +(provide 'tandoor) +;;; tandoor.el ends here From 92aeed85e8030265bb7ea8539c5569261b81fce9 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Sat, 28 Jun 2025 15:12:23 +0200 Subject: [PATCH 03/12] =?UTF-8?q?=F0=9F=94=90=20Update=20authinfo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- authinfo.gpg | Bin 736 -> 819 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/authinfo.gpg b/authinfo.gpg index 1c790f893e9e3bd149e5f51c1abb9743f86b6f84..7eb77b6bebb4262895008768c6dd4567c424344a 100644 GIT binary patch literal 819 zcmV-31I+w|0Sp5+vzQzOs)kAz zK3R^=uI7ljekeT~NEF(!!isH!>&_=Z9vQAq<1IzW?MQ_qZh~|5hboQZfkwP6mlPb2 zf)7M0WSqoaYS7-HlXP{a~ ziB|x_qz&OqfQFRs)XJhvlDX390bR1(%oJP<`hqjk#SQ<6&yicMQe(*75b zz8-(+eqO?U5anl9n9d;AlR-k+@w{@+Yvbb+CoPj=Dq?B~Yqxec4_+E;Ji}vo`1oEF zSf7qWO}g+m_Qc?!t5A-Jn`_>2!kEpP3_UrLF65vH#`S^DKKv8|?+efc(j% ztqoX1L6_2EpjBv!Y!EBM!&Zbow{2^MVtNPtVBy2o%Pn1;G)Zkrtl$7UW1Ej-7F@;w zUjQBY{UM#Dl=E0fs}0$MiWrTFT}S|RQTR1QzFSx_U8QI-cw9Ph0wY83db8SSr7dTr xv)%S!d?E1*yVMC9opf8=Mq;4f@Zc{~K%?KkQyi?9Fy literal 736 zcmV<60w4W_0Sp5+vzQzOsPyy55`0~F4J)um-Xsi41MK4 zsLO{@f_5G|^S%qfuG?{n3w079u@cJTGnf|>FJGrl+UzCAgyJyocOv{kxF>uvak6nh zo^R{0IA+{HSO=?~9gr*WEtDQLz-AcBwROfxUq2A7HtxIsWfZ_Y# z8A~*N$0s(kse=@5iBv1q^WD z-_B|^6Zxs6=$q#Nif>=44R~>&llcl>M~+Q1EAk!O0#OHeZKvd|lrJu~-Zq+YFQ$H$ zA7E{^$e4btVHrtdCW-#3QvySctNtn{)G!(14C~t0Uda}1lQk-MG50UnQW=1Mh+e1>Lf+6mR&C3qydypk?KS5 zIv(dc7q>(wyN{#f+jP?ph6IT-vnp^AV*HO`jf4{W_ zp8M|l!E+Hb0;ww_W#WjMR?MyNfpBi Date: Sat, 28 Jun 2025 15:12:50 +0200 Subject: [PATCH 04/12] =?UTF-8?q?=F0=9F=90=9B=20(tab-bar-helpers)=20Fix=20?= =?UTF-8?q?for=20missing=20hydra=20dependency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/mmk2410-tab-bar-helpers.el | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/mmk2410-tab-bar-helpers.el b/packages/mmk2410-tab-bar-helpers.el index 62d63c8..fe1bd46 100644 --- a/packages/mmk2410-tab-bar-helpers.el +++ b/packages/mmk2410-tab-bar-helpers.el @@ -4,6 +4,7 @@ ;;; Personal helpers and shortcuts to work more effectively with tab-bar mode. ;;; Code: +(require 'hydra) (defun mmk2410/tab-bar-new-tab (name func) "Create new tab using FUNC with name NAME." From b4a124d2926351743ed554391b2acd2329174c62 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Sat, 28 Jun 2025 15:13:25 +0200 Subject: [PATCH 05/12] =?UTF-8?q?=F0=9F=94=A7=20(macos)=20Additional=20adj?= =?UTF-8?q?ustments=20for=20emacs-plus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/config.org b/config.org index 8c2dc25..a592586 100644 --- a/config.org +++ b/config.org @@ -41,7 +41,17 @@ For using the Macbook keyboard effectively with Emacs I made some adjustments ba (setq mac-option-modifier 'alt) (setq mac-right-option-modifier 'none) (setq mac-command-modifier 'meta) - (global-set-key [kp-delete] 'delete-char)) + (global-set-key [kp-delete] 'delete-char) + (add-to-list 'default-frame-alist '(ns-transparent-titlebar . t)) + (setq ns-pop-up-frames nil)) +#+end_src + +Additionally, getting the correct path in the App executable is apparently not that simply. Thankfully, [[https://www.sanityinc.com/][Steve Purcell]] wrote the [[https://github.com/purcell/exec-path-from-shell][exec-path-from-shell]] helper. + +#+begin_src emacs-lisp +(use-package exec-path-from-shell + :when on-macos + :init (exec-path-from-shell-initialize)) #+end_src ** System Detection @@ -54,7 +64,6 @@ My work machine is called “mccarthy” and there is some configuration which I (string-equal (system-name) "mccarthy")) #+end_src - ** Personal Information #+begin_src emacs-lisp From aaa3894c381e91db867332bc4b782d18e170f100 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Sat, 28 Jun 2025 15:14:17 +0200 Subject: [PATCH 06/12] =?UTF-8?q?=F0=9F=94=A7=20Enable=20pixel-scroll-prec?= =?UTF-8?q?ision-mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config.org b/config.org index a592586..982a080 100644 --- a/config.org +++ b/config.org @@ -665,6 +665,11 @@ I found out that a bit more line spacing makes Emacs look more nicely and increa (setq-default line-spacing 4) #+end_src +** Scolling + +#+begin_src emacs-lisp +(pixel-scroll-precision-mode 1) +#+end_src * Keybinding List of own custom keybindings From c4d97d86e88292ab6c8d752128da5b43f357dd84 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Sat, 28 Jun 2025 15:18:25 +0200 Subject: [PATCH 07/12] =?UTF-8?q?=F0=9F=94=A7=20Disable=20ox-hugo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 1 + 1 file changed, 1 insertion(+) diff --git a/config.org b/config.org index 982a080..ccc8936 100644 --- a/config.org +++ b/config.org @@ -1698,6 +1698,7 @@ Since [[https://mmk2410.org/2020/05/15/switching-my-website-to-hugo-using-ox-hug #+begin_src emacs-lisp (use-package ox-hugo + :disabled t :after org) #+end_src From 2f254c4260791a3a8ebe23aae5ad4891dc999827 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Sat, 28 Jun 2025 15:18:37 +0200 Subject: [PATCH 08/12] =?UTF-8?q?=F0=9F=94=A7=20Configure=20epa=20and=20pl?= =?UTF-8?q?store=20encryption?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config.org b/config.org index ccc8936..790af50 100644 --- a/config.org +++ b/config.org @@ -71,6 +71,13 @@ My work machine is called “mccarthy” and there is some configuration which I user-mail-address "opensource@mmk2410.org") #+end_src +** Encryption + +#+begin_src emacs-lisp +(setq plstore-encrypt-to "opensource@mmk2410.org" + epa-file-encrypt-to "opensource@mmk2410.org") +#+end_src + ** Date & Time Set the first day of the week to Mondays. From 61fdbfe5d8cf13162ec27968287de7b232b1cd58 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Sat, 28 Jun 2025 15:19:07 +0200 Subject: [PATCH 09/12] =?UTF-8?q?=F0=9F=90=9B=20Fix=20mastodon=20configura?= =?UTF-8?q?tion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/config.org b/config.org index 790af50..9605dc0 100644 --- a/config.org +++ b/config.org @@ -2451,9 +2451,10 @@ Emacs client for Mastodon. #+begin_src emacs-lisp (use-package mastodon - :config - (setq mastodon-instance-url "https://fosstodon.org" - mastodon-active-user "mmk2410") + :custom + (mastodon-instance-url "https://fosstodon.org") + (mastodon-active-user "mmk2410") + (mastodon-auth-use-auth-source t) :bind ("C-c M" . mastodon)) #+end_src From b31fbacfaf1bbcd5e62cc541413c7ba1e6f57b09 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Sat, 28 Jun 2025 15:19:26 +0200 Subject: [PATCH 10/12] =?UTF-8?q?=E2=9C=A8=20Adjust=20org-drill=20configur?= =?UTF-8?q?aton=20and=20add=20org=20capture=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/config.org b/config.org index 9605dc0..dd39732 100644 --- a/config.org +++ b/config.org @@ -1694,9 +1694,20 @@ Source: [[https://gitlab.com/phillord/org-drill/][GitLab: phillord/org-drill]] #+begin_src emacs-lisp (use-package org-drill :after org + :custom + (org-drill-learn-fraction 0.4) + (org-drill-maximum-items-per-session 50) :config - (setq org-drill-learn-fraction 0.4) - (setq org-drill-maximum-items-per-session 50)) + (with-eval-after-load 'org-capture + (add-to-list 'org-capture-templates '("d" "Org Drill")) + (add-to-list + 'org-capture-templates + '("de" + "Org Drill: English Word" + entry + (file+headline "~/org/drill/english.org" "Two-sided") + "** %^{Type|Noun|Verb|Adjective|Conjuction} :drill:\n:PROPERTIES:\n:DRILL_CARD_TYPE: twosided\n:END:\n\n*** Word\n\n%^{Word}\n\n*** Description\n\n%^{Description}\n\n*** Examples\n\n%?\n\n" + :empty-lines 1)))) #+end_src ** Org for blogging From 6126dc36da89552343d124e5fcd661a07318cade Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Sat, 28 Jun 2025 15:20:07 +0200 Subject: [PATCH 11/12] =?UTF-8?q?=F0=9F=90=9B=20Fix=20quick=20capture=20or?= =?UTF-8?q?g=20capture=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.org b/config.org index dd39732..022a1d2 100644 --- a/config.org +++ b/config.org @@ -1466,7 +1466,7 @@ Define org-capture templates. (setq mmk2410/created-date ":PROPERTIES:\n:CREATED: %U\n:END:") (setq org-capture-templates `(("q" "Quick Capture" entry (file "~/org/tasks/inbox.org") - ,(concat "* TODO %^{Todo Title}\n:" mmk2410/created-date "\n") + ,(concat "* TODO %^{Todo Title}\n" mmk2410/created-date "\n") :immediate-finish t) ("p" "New Personal Project" entry (file "~/org/tasks/personal.org") ,(concat "* %? :@project:\n" mmk2410/created-date "\n")) From 3e7b3c09b881467cd96875be76d19dfe211a4f3e Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Sat, 28 Jun 2025 15:20:29 +0200 Subject: [PATCH 12/12] =?UTF-8?q?=F0=9F=92=84=20Disable=20variable=20pitch?= =?UTF-8?q?=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/config.org b/config.org index 022a1d2..c183be0 100644 --- a/config.org +++ b/config.org @@ -542,19 +542,19 @@ Installing and enabling ef-themes. (use-package ef-themes :init (setq ef-themes-to-toggle '(ef-eagle ef-owl)) - (setq ef-themes-mixed-fonts t) - (setq ef-themes-headings - '((0 . (variable-pitch light 1.9)) - (1 . (variable-pitch light 1.8)) - (2 . (variable-pitch regular 1.7)) - (3 . (variable-pitch regular 1.6)) - (4 . (variable-pitch regular 1.5)) - (5 . (variable-pitch 1.4)) - (6 . (variable-pitch 1.3)) - (7 . (variable-pitch 1.2)) - (t . (variable-pitch 1.1)))) + (setq ef-themes-mixed-fonts nil) + (setq ef-themes-headings nil) + ;;'((0 . (variable-pitch light 1.9)) + ;; (1 . (variable-pitch light 1.8)) + ;; (2 . (variable-pitch regular 1.7)) + ;; (3 . (variable-pitch regular 1.6)) + ;; (4 . (variable-pitch regular 1.5)) + ;; (5 . (variable-pitch 1.4)) + ;; (6 . (variable-pitch 1.3)) + ;; (7 . (variable-pitch 1.2)) + ;; (t . (variable-pitch 1.1)))) :config - (load-theme 'ef-owl t)) + (load-theme 'ef-eagle t)) #+end_src @@ -1630,8 +1630,8 @@ From [[https://github.com/daviwil/emacs-from-scratch/blob/master/Emacs.org#cente :hook (org-mode . efs/org-mode-visual-fill)) (add-hook 'org-mode-hook (lambda () - (display-line-numbers-mode -1) - (variable-pitch-mode))) + (display-line-numbers-mode -1))) + ; (variable-pitch-mode))) #+end_src ** Hooks