Compare commits
12 commits
4c58fa1033
...
3e7b3c09b8
Author | SHA1 | Date | |
---|---|---|---|
3e7b3c09b8 | |||
6126dc36da | |||
b31fbacfaf | |||
61fdbfe5d8 | |||
2f254c4260 | |||
c4d97d86e8 | |||
aaa3894c38 | |||
b4a124d292 | |||
303ff8b3f6 | |||
92aeed85e8 | |||
2bb04f6953 | |||
9d0d4ce330 |
5 changed files with 140 additions and 22 deletions
BIN
authinfo.gpg
BIN
authinfo.gpg
Binary file not shown.
98
config.org
98
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-option-modifier 'alt)
|
||||||
(setq mac-right-option-modifier 'none)
|
(setq mac-right-option-modifier 'none)
|
||||||
(setq mac-command-modifier 'meta)
|
(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
|
#+end_src
|
||||||
|
|
||||||
** System Detection
|
** System Detection
|
||||||
|
@ -54,7 +64,6 @@ My work machine is called “mccarthy” and there is some configuration which I
|
||||||
(string-equal (system-name) "mccarthy"))
|
(string-equal (system-name) "mccarthy"))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
** Personal Information
|
** Personal Information
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
@ -62,6 +71,13 @@ My work machine is called “mccarthy” and there is some configuration which I
|
||||||
user-mail-address "opensource@mmk2410.org")
|
user-mail-address "opensource@mmk2410.org")
|
||||||
#+end_src
|
#+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
|
** Date & Time
|
||||||
|
|
||||||
Set the first day of the week to Mondays.
|
Set the first day of the week to Mondays.
|
||||||
|
@ -526,19 +542,19 @@ Installing and enabling ef-themes.
|
||||||
(use-package ef-themes
|
(use-package ef-themes
|
||||||
:init
|
:init
|
||||||
(setq ef-themes-to-toggle '(ef-eagle ef-owl))
|
(setq ef-themes-to-toggle '(ef-eagle ef-owl))
|
||||||
(setq ef-themes-mixed-fonts t)
|
(setq ef-themes-mixed-fonts nil)
|
||||||
(setq ef-themes-headings
|
(setq ef-themes-headings nil)
|
||||||
'((0 . (variable-pitch light 1.9))
|
;;'((0 . (variable-pitch light 1.9))
|
||||||
(1 . (variable-pitch light 1.8))
|
;; (1 . (variable-pitch light 1.8))
|
||||||
(2 . (variable-pitch regular 1.7))
|
;; (2 . (variable-pitch regular 1.7))
|
||||||
(3 . (variable-pitch regular 1.6))
|
;; (3 . (variable-pitch regular 1.6))
|
||||||
(4 . (variable-pitch regular 1.5))
|
;; (4 . (variable-pitch regular 1.5))
|
||||||
(5 . (variable-pitch 1.4))
|
;; (5 . (variable-pitch 1.4))
|
||||||
(6 . (variable-pitch 1.3))
|
;; (6 . (variable-pitch 1.3))
|
||||||
(7 . (variable-pitch 1.2))
|
;; (7 . (variable-pitch 1.2))
|
||||||
(t . (variable-pitch 1.1))))
|
;; (t . (variable-pitch 1.1))))
|
||||||
:config
|
:config
|
||||||
(load-theme 'ef-owl t))
|
(load-theme 'ef-eagle t))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
@ -656,6 +672,11 @@ I found out that a bit more line spacing makes Emacs look more nicely and increa
|
||||||
(setq-default line-spacing 4)
|
(setq-default line-spacing 4)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Scolling
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(pixel-scroll-precision-mode 1)
|
||||||
|
#+end_src
|
||||||
* Keybinding
|
* Keybinding
|
||||||
|
|
||||||
List of own custom keybindings
|
List of own custom keybindings
|
||||||
|
@ -1445,7 +1466,7 @@ Define org-capture templates.
|
||||||
(setq mmk2410/created-date ":PROPERTIES:\n:CREATED: %U\n:END:")
|
(setq mmk2410/created-date ":PROPERTIES:\n:CREATED: %U\n:END:")
|
||||||
(setq org-capture-templates
|
(setq org-capture-templates
|
||||||
`(("q" "Quick Capture" entry (file "~/org/tasks/inbox.org")
|
`(("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)
|
:immediate-finish t)
|
||||||
("p" "New Personal Project" entry (file "~/org/tasks/personal.org")
|
("p" "New Personal Project" entry (file "~/org/tasks/personal.org")
|
||||||
,(concat "* %? :@project:\n" mmk2410/created-date "\n"))
|
,(concat "* %? :@project:\n" mmk2410/created-date "\n"))
|
||||||
|
@ -1609,8 +1630,8 @@ From [[https://github.com/daviwil/emacs-from-scratch/blob/master/Emacs.org#cente
|
||||||
:hook (org-mode . efs/org-mode-visual-fill))
|
:hook (org-mode . efs/org-mode-visual-fill))
|
||||||
|
|
||||||
(add-hook 'org-mode-hook (lambda ()
|
(add-hook 'org-mode-hook (lambda ()
|
||||||
(display-line-numbers-mode -1)
|
(display-line-numbers-mode -1)))
|
||||||
(variable-pitch-mode)))
|
; (variable-pitch-mode)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Hooks
|
** Hooks
|
||||||
|
@ -1673,9 +1694,20 @@ Source: [[https://gitlab.com/phillord/org-drill/][GitLab: phillord/org-drill]]
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package org-drill
|
(use-package org-drill
|
||||||
:after org
|
:after org
|
||||||
|
:custom
|
||||||
|
(org-drill-learn-fraction 0.4)
|
||||||
|
(org-drill-maximum-items-per-session 50)
|
||||||
:config
|
:config
|
||||||
(setq org-drill-learn-fraction 0.4)
|
(with-eval-after-load 'org-capture
|
||||||
(setq org-drill-maximum-items-per-session 50))
|
(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
|
#+end_src
|
||||||
|
|
||||||
** Org for blogging
|
** Org for blogging
|
||||||
|
@ -1684,6 +1716,7 @@ Since [[https://mmk2410.org/2020/05/15/switching-my-website-to-hugo-using-ox-hug
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package ox-hugo
|
(use-package ox-hugo
|
||||||
|
:disabled t
|
||||||
:after org)
|
:after org)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -2429,9 +2462,10 @@ Emacs client for Mastodon.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package mastodon
|
(use-package mastodon
|
||||||
:config
|
:custom
|
||||||
(setq mastodon-instance-url "https://fosstodon.org"
|
(mastodon-instance-url "https://fosstodon.org")
|
||||||
mastodon-active-user "mmk2410")
|
(mastodon-active-user "mmk2410")
|
||||||
|
(mastodon-auth-use-auth-source t)
|
||||||
:bind ("C-c M" . mastodon))
|
:bind ("C-c M" . mastodon))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -2934,6 +2968,26 @@ API Integration for [[https://linkding.link/][Linkding]].
|
||||||
linkding-user "mmk2410"))
|
linkding-user "mmk2410"))
|
||||||
#+end_src
|
#+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.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package edam
|
||||||
|
:load-path "packages/")
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Work
|
* Work
|
||||||
|
|
||||||
For my workplace I have some additional packages and configuration that I keep in an own file.
|
For my workplace I have some additional packages and configuration that I keep in an own file.
|
||||||
|
|
23
packages/edam.el
Normal file
23
packages/edam.el
Normal file
|
@ -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
|
|
@ -4,6 +4,7 @@
|
||||||
;;; Personal helpers and shortcuts to work more effectively with tab-bar mode.
|
;;; Personal helpers and shortcuts to work more effectively with tab-bar mode.
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
(require 'hydra)
|
||||||
|
|
||||||
(defun mmk2410/tab-bar-new-tab (name func)
|
(defun mmk2410/tab-bar-new-tab (name func)
|
||||||
"Create new tab using FUNC with name NAME."
|
"Create new tab using FUNC with name NAME."
|
||||||
|
|
40
packages/tandoor.el
Normal file
40
packages/tandoor.el
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue