38 KiB
38 KiB
m3tam3re's Emacs configuration
DOOM, FONT & THEME SETTING
User Settings
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
(setq user-full-name "Sascha"
user-mail-address "m@m3tam3re.com")
(require 'org-protocol)
(require 'org-roam-protocol)
Font, Theme & other visual settings
;; Doom exposes five (optional) variables for controlling fonts in Doom:
;;
;; - `doom-font' -- the primary font to use
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;; - `doom-symbol-font' -- for unicode glyphs
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
;;
;; See 'C-h v doom-font' for documentation and more examples of what they
;; accept. For example:
;;
(setq doom-font (font-spec :family "Fira Code" :size 14 :weight 'regular)
doom-variable-pitch-font (font-spec :family "Fira Code" :size 15)
doom-symbol-font (font-spec :familiy "Noto Color Emoji"))
(setq fancy-splash-image "/home/m3tam3re/Projekte/Grafik/m3tam3re/logo-100.png")
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
;; refresh your font settings. If Emacs still can't find your font, it likely
;; wasn't installed correctly. Font issues are rarely Doom issues!
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
;;(setq doom-theme 'doom-dracula)
;; (add-to-list 'custom-theme-load-path "~/.config/doom/themes")
(load-theme 'dracula-pro-pro t)
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type 'relative)
(setq highlight-indent-guides-auto-enabled nil)
(column-number-mode)
(after! highlight-indent-guides
(set-face-background 'highlight-indent-guides-odd-face "darkgray")
(set-face-background 'highlight-indent-guides-even-face "dimgray")
(set-face-foreground 'highlight-indent-guides-character-face "dimgray"))
ORG MODE
(map! :leader
:desc "ORG Babel Tangle" "m B" #'org-babel-tangle)
(after! org
(setq org-directory "~/wiki"
org-ellipsis " ▾"
org-agenda-skip-scheduled-if-done t
org-agenda-skip-deadline-if-done t
org-agenda-include-deadlines t
org-agenda-block-separator nil
org-agenda-start-day nil ;; i.e. today
org-agenda-start-on-weekday nil
org-log-into-drawer t
org-habit-graph-column 60
org-use-fast-todo-selection t
org-fancy-priorities-mode t
org-agenda-files
'("Aufgaben.org"
"Basecamp.org"
"Routinen.org"
"Geburtstage.org"
"Kalender.org"
"Mobile.org"
)
org-todo-keywords
'((sequence
"TASK(t)"
"NEXT(n)"
"|"
"DELEGATED(f@/!)"
"TRASHED(j@/!)"
"COMPLETED(d!)")
(sequence
"BACKLOG(b)"
"PLANNING(p)"
"READY(R)"
"ACTIVE(a)"
"REVIEW(v)"
"WAITING(w@/!)"
"ON-HOLD(h)"
"|"
"DONE(c)"
"CANCELLED(k@)")
(sequence
"IDEA(i)"
"RESEARCH(S)"
"TITLE/HOOK/THUMB(t)"
"WRITING(W)"
"FILMING(f)"
"EDITING(e)"
"READY(r)"
"WAITING(w@/!)"
"ON-HOLD(h)"
"|"
"PUBLISHED(p)"
"CANCELLED(k@)"))
org-refile-targets
'(("Archiv.org" :maxlevel . 5)
("Aufgaben.org" :maxlevel . 5)
("Basecamp.org" :maxlevel . 6))
org-tag-alist
'((:startgroup)
(:endgroup)
("EMAIL" . ?e)
("WORK" . ?w)
("DEADLINE" . ?a)
("PLANNING" . ?p)
("WRITING" . ?s)
("TIDEOUS" . ?a)
("NOTE" . ?n)
("IDEA" . ?i)
("MAYBE LATER" . ?v))
)
;; Save Org buffers after refiling!
(advice-add 'org-refile :after 'org-save-all-org-buffers))
(use-package! org-bullets
:hook (org-mode . org-bullets-mode)
:custom
(org-bullets-bullet-list '("◉" "○" "●" "○" "●" "○" "●")))
(use-package org-fancy-priorities
:ensure t
:hook
(org-mode . org-fancy-priorities-mode)
:config
(setq org-fancy-priorities-list '("🟥" "🟧" "🟨")))
;; Org-habit
(use-package! org-habit
:after org
:config
(setq org-habit-following-days 7
org-habit-preceding-days 35
org-habit-show-habits t))
ORG FONTS
(defun m3ta/org-setup ()
(interactive)
(setq org-hide-emphasis-markers t)
(variable-pitch-mode 1)
(visual-line-mode 1))
(after! org
(m3ta/org-setup))
(defun m3ta/org-mode-visual-fill ()
(interactive)
(setq visual-fill-column-width 180
visual-fill-column-center-text t)
(visual-fill-column-mode 1))
(use-package! visual-fill-column
:hook (org-mode . m3ta/org-mode-visual-fill))
ORG AGENDA
(after! org
(setq org-agenda-files '("~/ORG/agenda.org")
org-fancy-priorities-list '("🟥" "🟧" "🟨")
org-priority-faces
'((?A :foreground "#ff6c6b" :weight bold)
(?B :foreground "#98be65" :weight bold)
(?C :foreground "#c678dd" :weight bold))
org-agenda-block-separator 8411)
(setq org-agenda-custom-commands
'(("d" "OVERVIEW"
((agenda "" ((org-deadline-warning-days 7)))
(tags "PRIORITY=\"A\""
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
(org-agenda-overriding-header "HIGH PRIORITY TASKS")))
(todo "NEXT"
((org-agenda-overriding-header "UP NEXT")))
(tags-todo "agenda/ACTIVE" ((org-agenda-overriding-header "ACTIVE PROJECTS/VIDEOS")))
(tags-todo "+Effort<15+Effort>0" ((org-agenda-overriding-header "LOW EFFORT TASKS")
(org-agenda-max-todos 20)
(org-agenda-files org-agenda-files)))
))
("n" "NEXT"
((todo "NEXT"
((org-agenda-overriding-header "UP NEXT")))))
("W" "Aufgaben LANA KK" tags-todo "+work-email")
("u" "Super view"
((agenda "" ( (org-agenda-span 1)
(org-super-agenda-groups
'(
(:name "TODAY\n----------------------------------"
:tag ("bday" "ann" "hols" "cal" "today")
:time-grid t
:todo t
:deadline today
:scheduled today)
(:name "OVERDUE\n----------------------------------"
:deadline past)
(:name "RESCHEDULE\n----------------------------------"
:scheduled past)
(:name "HABITS\n----------------------------------"
:habit t)
(:name "DUE SOON\n----------------------------------"
:deadline future
:scheduled future)
()
))))
(tags (concat "w" (format-time-string "%V")) ((org-agenda-overriding-header (concat "--\nToDos Week " (format-time-string "%V")))
(org-super-agenda-groups
'((:discard (:deadline t))
(:discard (:scheduled t))
(:discard (:todo ("DONE")))
(:name "Ticklers"
:tag "cal")
(:name "Perso"
:and (:tag "perso" :not (:tag "someday")))
(:name "UH"
:and (:tag "uh" :not (:tag "someday")))
;; (:name "Neo"
;; :and (:tag "neo" :not (:tag "someday")))
(:name "Ping"
:tag "crm")
))))
))
("w" "Workflow Status"
((todo "WAITING"
((org-agenda-overriding-header "WAITING FOR FEEDBACK")
(org-agenda-files org-agenda-files)))
(todo "REVIEW"
((org-agenda-overriding-header "IN REVIEW")
(org-agenda-files org-agenda-files)))
(todo "PLANNING"
((org-agenda-overriding-header "PLANNING PHASE")
(org-agenda-todo-list-sublevels nil)
(org-agenda-files org-agenda-files)))
(todo "BACKLOG"
((org-agenda-overriding-header "ENDLESS BACKLOG")
(org-agenda-todo-list-sublevels nil)
(org-agenda-files org-agenda-files)))
(todo "READY"
((org-agenda-overriding-header "READY TO PROCEED")
(org-agenda-files org-agenda-files)))
(todo "ACTIVE"
((org-agenda-overriding-header "ACTIVE PROJECTS")
(org-agenda-files org-agenda-files)))
(todo "DONE"
((org-agenda-overriding-header "DONE PROJECTS")
(org-agenda-files org-agenda-files)))
(todo "CANCELLED"
((org-agenda-overriding-header "CANCELLED PROJECTS")
(org-agenda-files org-agenda-files)))))
("v" "YOUTUBE WORKFLOW"
((todo "WAITING"
((org-agenda-overriding-header "WAITING FOR FEEDBACK")
(org-agenda-files org-agenda-files)))
(todo "ON-HOLD"
((org-agenda-overriding-header "WAITING FOR FEEDBACK")
(org-agenda-files org-agenda-files)))
(todo "NEXT"
((org-agenda-overriding-header "NEXT VIDEO")
(org-agenda-files org-agenda-files)))
(todo "IDEA"
((org-agenda-overriding-header "FIRST VIDEO IDEA")
(org-agenda-files org-agenda-files)))
(todo "RESEARCH"
((org-agenda-overriding-header "DATA COLLECTION")
(org-agenda-todo-list-sublevels nil)
(org-agenda-files org-agenda-files)))
(todo "T-H-T"
((org-agenda-overriding-header "TITLE HOOK & THUMBNAIL")
(org-agenda-todo-list-sublevels nil)
(org-agenda-files org-agenda-files)))
(todo "WRITING"
((org-agenda-overriding-header "SCRIPT WRITING")
(org-agenda-files org-agenda-files)))
(todo "EDITING"
((org-agenda-overriding-header "VIDEO EDITING")
(org-agenda-files org-agenda-files)))
(todo "READY"
((org-agenda-overriding-header "READY TO PUBLISH")
(org-agenda-files org-agenda-files)))
(todo "PUBLISHED"
((org-agenda-overriding-header "PUBLISHED TO YOUTUBE")
(org-agenda-files org-agenda-files)))
(todo "CANCELLED"
((org-agenda-overriding-header "CANCELLED PROJECTS")
(org-agenda-files org-agenda-files))))))))
(setq org-overriding-columns-format "%TODO %7EFFORT %PRIORITY %100ITEM")
%TODO %7EFFORT %PRIORITY %100ITEM
(use-package! org-super-agenda
:after org-agenda
:init
(setq org-super-agenda-groups
'(
(:name "TODAY"
:tag ("bday" "ann" "hols" "cal" "today")
:time-grid t
:date today
:todo t
:deadline today
:scheduled today)
(:name "OVERDUE"
:deadline past)
(:name "RESCHEDULE"
:scheduled past)
(:name "PERSONAL"
:tag "perso")
(:name "DUE SOON"
:deadline future
:scheduled future)
(:name "LOW EFFORT TASKS"
:todo t
:effort< "5")
))
:config
(org-super-agenda-mode)
(org-agenda nil "u")
)
ORG CAPTURE TEMPLATES
(defun m3ta/org-ask-for-file ()
"Prompt for a file in directory DIR."
(expand-file-name
(read-file-name "Capture to file:")))
(after! org
(setq org-capture-templates
'(("f" "Entry with File Prompt" entry (file+headline m3ta/org-ask-for-file "EINGANG")
"* %?\nEntered on %U\n %i\n %a")))
)
ORG-AUTO-TANGLE
(use-package! org-auto-tangle
:defer t
:hook (org-mode . org-auto-tangle-mode)
:config
(setq org-auto-tangle-default t))
(defun m3ta/insert-auto-tangle-tag ()
(interactive)
(evil-org-open-below 1)
(insert "#+auto_tangle: t ")
(evil-force-normal-state))
(map! :leader
:desc "Insert auto_tangle tag" "i a" #'m3ta/insert-auto-tangle-tag)
OX-HUGO ATTACH
(use-package! ox-hugo
:ensure t
:after ox)
ORG-AI
(use-package! org-ai
:ensure t
:commands (org-ai-mode
org-ai-global-mode)
:custom
(setq org-ai-openai-api-token (getenv "OPENAI_API_KEY"))
:init
(add-hook 'org-mode-hook #'org-ai-mode) ; enable org-ai in org-mode
(org-ai-global-mode) ; installs global keybindings on C-c M-a
:config
(setq org-ai-default-chat-model "gpt-4-1106-preview") ; if you are on the gpt-4 beta:
(org-ai-install-yasnippets)) ; if you are using yasnippet and want `ai` snippets
ORG ROAM
(map! :leader
(:prefix ("n r" . "org-roam")
:desc "Completion at point" "c" #'completion-at-point
:desc "Find node" "f" #'org-roam-node-find
:desc "Find Project" "p" #'m3ta/org-roam-find-project
:desc "Find Area" "a" #'m3ta/org-roam-find-area
:desc "Capture Task" "t" #'m3ta/org-roam-capture-task
:desc "Capture Area Task" "T" #'m3ta/org-roam-capture-area-task
:desc "Capture Inbox" "b" #'m3ta/org-roam-capture-inbox
:desc "Show graph" "g" #'org-roam-ui-node-local
:desc "Insert node" "i" #'org-roam-node-insert
:desc "Insert empty node" "I" #'m3ta/org-roam-node-insert-immediate
:desc "Capture to node" "n" #'org-roam-capture
:desc "Toggle roam buffer" "r" #'org-roam-buffer-toggle))
(after! org
(setq org-roam-directory "~/wiki/roam"
org-roam-dailies-directory "5 📕 JOURNAL/"
org-roam-completion-everywhere t
org-roam-node-display-template
(concat "${type:15} ${title:*} " (propertize "${tags:20}" 'face 'org-tag)))
(org-roam-db-autosync-mode))
CAPTURE TEMPLATES ATTACH
sss
(setq org-roam-dailies-capture-templates
'(("n" "Note" entry "*** %<%I:%M %p>: %?\n"
:if-new (file+head+olp "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n\n* REFLECTION\n** 🥰 What did I achieve today?\n\n...\n\n** 🥹 What did I not achieve?\n\n...\n\n** 🍀 What went well?\n\n...\n\n** 🤕 What did not work out as planned?\n\n...\n\n** 🦸 How can I improve for the future?\n\n...\n\n* NOTES\n\n* TASKS\n\n #+BEGIN: clocktable :scope file :maxlevel 5\n\n" ("NOTES")))
("t" "Task" entry "*** TASK %?\n"
:if-new (file+head+olp "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n\n* REFLECTION\n** 🥰 What did I achieve today?\n\n...\n\n** 🥹 What did I not achieve?\n\n...\n\n** 🍀 What went well?\n\n...\n\n** 🤕 What did not work out as planned?\n\n...\n\n** 🦸 How can I improve for the future?\n\n...\n\n* NOTES\n\n* TASKS\n\n #+BEGIN: clocktable :scope file :maxlevel 5\n\n" ("TASKS"))))
org-roam-capture-ref-templates
'(("w" "Web" plain
"%?\n\n#+begin_quote\n${body}\n#+end_quote\n"
:if-new (file+head "3 📙 RESOURCES/%<%Y%m%d%H%M%S>-${slug}.org" ":PROPERTIES:\n:ROAM_REFS: ${ref}\n:END:\n#+title: ${title}\n#+filetags: :📙RESOURCE:🌐WEB:☁DRAFT:\n\n")
:unnarrowed t)
("b" "Basecamp" entry "** TASK ${title}\nURL: ${ref}\n\n%?\n\n#+begin_quote\n${body}\n#+end_quote\n\n"
:if-new (file+head+olp "2 ♾️ AREAS/Inbox.org" "#+title: 💌 INBOX\n#+filetags: :♾️AREA:\n\n* NOTES\n\n* TASKS\n\n " ("TASKS"))))
org-roam-capture-templates
'(("d" "default" plain
"%?"
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n* BLA\n%?\n* BLUN")
:unnarrowed t)
("a" "area" plain
"${DESCRIPTION}\n\n* NOTES\n\n%"
:if-new (file+head "2 ♾️ AREAS/%<%Y%m%d%H%M%S>-${slug}.org" ":PROPERTIES:\n:ROAM_REFS: ${URL}\n:END:\n#+title: ${title}\n#+filetags: :♾️AREA:\n\n")
:unnarrowed t)
("r" "Resource" plain
"${DESCRIPTION}\n\n* NOTES\n\n%?"
:if-new (file+head "3 📙 RESOURCES/%<%Y%m%d%H%M%S>-${slug}.org" ":PROPERTIES:\n:ROAM_REFS: ${URL}\n:END:\n#+title: ${title}\n#+filetags: :📙RESOURCE:\n\n")
:unnarrowed t)
("e" "Empty Resource Node" plain
"Please fill this with life...\n\n* NOTES\n\n%?"
:if-new (file+head "3 📙 RESOURCES/%<%Y%m%d%H%M%S>-${slug}.org" ":PROPERTIES:\n:ROAM_REFS: \n:END:\n#+title: ${title}\n#+filetags: :📙RESOURCE:☁️DRAFT:\n\n")
:unnarrowed t)
("p" "New Project" plain
"${DESCRIPTION}\n\n* GOALS\n\n** ...%?\n\n* TASKS\n\n** TODO ...\n\n* DEADLINES\n\n** ..."
:if-new (file+head "1 👽 PROJECTS/%<%Y%m%d%H%M%S>-${slug}.org" ":PROPERTIES:\n:END:\n#+title: ${title}\n#+filetags: :👽PROJECT:")
:unnarrowed t)
("s" "Code Snippet" plain
"${DESCRIPTION}\n\n* CODE SNIPPET\n\n#+begin_src %?\n#+end_src\n\n"
:if-new (file+head "3 📙 RESOURCES/%<%Y%m%d%H%M%S>-${slug}.org" ":PROPERTIES:\n:ROAM_REFS: ${URL}\n:END:\n#+title: ${title}\n#+filetags: :🤖SNIP-${SPRACHE(RS,GO,NIX,JS,TS,PHP,RUBY,PYTHON...)}:")
:unnarrowed t)
("b" "Buchnotiz / Artikel" plain
"\n* SOURCE:\n\nAUTHOR: ${AUTHOR}\nTITLE: ${TITLE}\nYEAR: ${YEAR}\n\n* TLDR;\n\n%?\n\n"
:if-new (file+head "3 📙 RESOURCES/%<%Y%m%d%H%M%S>-${slug}.org" ":PROPERTIES:\n:ROAM_REFS: ${URL}\n:END:\n#+title: ${title}\n#+filetags: ${QUELLE(:BLOG:,:BOOK:)}")
:unnarrowed t)
("y" "YOUTUBE")
("yv" "New Video" plain
"* IDEA ${title}%?\n\n* General concepts & thought\n- ...\n- ...\n\n* Title Ideas\n\n=Please suggest at least 10 and tick/star your favourite one. Keep all titles less than 55 characters! 😄= [0/2]\n\nThink about Power Words. Things like “for beginners”, “ultimate guide”, “instantly”, “for free”, “in a weekend”, “from your bedroom”, “without money”, “easy”, “best”, etc. What are the power words within our niche that we can add into titles to make a more compelling one?\n\n- [ ] Title\n- [ ] ...\n\n* Thumbnail Ideas\n\n=Please include images, approx 3 ideas are good. If these choices can be somewhat data-driven that's even better= 😁 [0/3]\n\n- [ ] Thumbnail 1\n\n\n\n- [ ] Thumbnail 2\n\n\n\n- [ ] Thumbnail 3\n\n* Hook\n\n...\n\n** Hook Alternative 1\n...\n\n** Hook Alternative 2\n\n* Intro\n\n...\n\n* Value\n\n...\n\n* End Screen / Sales Pitch\n\n...\n\n* TASKS\n\n** Pre-Filming Tasks\n\n*** TODO Finalise Title\n\n*** TODO Finalise Thumbnail\n\n*** TODO Finalise Hook\n\n*** TODO Write Shorts\n\n\n* Brand Components:\n\n** ✨ Values\n1. Freedom - Avoid being shackled to a job you don’t enjoy\n2. Efficiency - If we can get the stuff we have to do done efficiently, we can spend more time and energy on the stuff we want to do.\n** 🪙 Icons + Tokens\n1. Harry Potter references - Hermione (Tesla), Luna (headphones), Aragog (spider plant)\n2. Journey Before Destination - This is one of the ideals of the Knights Radiant from Brandon Sanderson’s The Stormlight Archive series. I fully embrace this. Similar to Miley Cyrus’ “Ain’t about how fast I get there. Ain’t about what’s waiting on the other side. It’s the climb”. I’ve referenced both these many times in videos\n** 📣 Rituals\n1. Join me for a cup of tea as we talk about\n2. ...\n** 🦸 Superpowers\n1. Productivity\n2. Coding\n3. ...\n"
:if-new (file+head "1 👽 PROJECTS/%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+filetags: :👽PROJECT:🎬VIDEO:\n\n")
:unnarrowed t)
("yi" "YOUTUBE IDEA GENERATION")
("yi4" "Content Ideas with the 4A Method" plain
"4A Method helps generating content ideas by asking questions. Going through the prompts should give a couple of ideas.\n\n\n* What do you want to make a video about?\n\n* Content Ideas for ${title}:\n\n** Actionable\n\n*** What topics can you provide actionable, implementable information on? Your viewer should gain some new insight or instruction they didn’t have beforehand.\n\n...\n\n*** Do you have any tips, hacks or other cool resources you could speak about for your audience?\n\n...\n\n*** What core ideas do you have which you could help a viewer put into practise?\n\n...\n\n** Analytical\n\n*** What are some ideas in your niche which you can break down supported by numbers, frameworks and processes?\n\n...\n\n*** Can you identify any industry trends in your niche (common patterns, widely held beliefs etc.)?\n\n...\n\n*** Do you have any surprising numbers or information which might be useful to your audience or which back up why an idea you have would work for people?\n\n...\n\n** Aspirational\n\n*** What lessons have you learned or been taught in your life which, when explained to your viewer, would help see the world through a new lens and unlock new benefits in their life?\n\n...\n\n*** What mistakes have you made which, as a learning experience, could change your viewers perspective?\n\n...\n\n*** What other aspirational content tells a story of how you or others put your core idea into practise? This could be a “how to get started” guide, or “ten underrated X things about X”\n\n\n** Anthropological\n\n*** -What fears do you have within your niche that might speak to universal human nature?\n\n...\n\n*** What failures have you seen which could create learning experiences for your viewers?\n\n...\n\n*** What struggles or difficulties have you been through or witnessed others go through in your niche?\n\n...\n\n*** Why are other people in your niche wrong in what they say about X topic?\n\n...\n"
:if-new (file+head "3 📙 RESOURCES/%<%Y%m%d%H%M%S>-${slug}.org" "#+title: 🔢 Content Ideas for ${title}\n#+filetags: :📙RESOURCE:🤔THINKING:🎯IDEA-LIST:\n\n")
:unnarrowed t)
("yih" "The heroes journey script template" plain
"The heroes's journey is format to tell a better story that is more interesting and more relatable for the viewer.\n\n* The heroes journey for:\n\n* 10 Title Ideas [0/10]\n\n1. [ ]\n2. [ ]\n3. [ ]\n4. [ ]\n5. [ ]\n6. [ ]\n7. [ ]\n8. [ ]\n9. [ ]\n10. [ ]\n\n* Thumbnails\n\n** Option 1\n\n\n** Option 2\n\n\n* Hook\n\n...\n\n* Introduction\n\n...\n\n* Your Heroes's Journey\n\nAnswer the following 7 questions. The key questions to concentrate on are numbers 4 and 7 but you should be able to provide an answer for all of them.\n\n1. Who is the character?\n\n ...\n\n2. What do they want?\n\n ...\n\n3. Why can’t they get what they want?\n\n ...\n\n4. What are the stakes? Ie: What will happen if they don’t get what they want?\n\n ...\n\n5. Who or what helps them?\n\n ...\n\n6. How do they get what they want?\n\n ...\n\n7. How are they transformed by this experience?\n\n* Body\n\n...\n\n* Conclusion and Outro\n\n...\n"
:if-new (file+head "3 📙 RESOURCES/%<%Y%m%d%H%M%S>-${slug}.org" "#+title: 🦸 The Heroe's Journey for: ${title}\n#+filetags: :📙RESOURCE:🤔THINKING:📄SCRIPT:\n\n")
:unnarrowed t)
("yi5" "5 Month of Content in 5 Minutes" plain
"💡 The following is a framework for creating a massive amount of video ideas in a very short amount of time. You definitely don’t need to use all of them if you don’t want to, but it’s a fantastic example of just how much you can create once you’ve taken the time to brainstorm.\n\n* Step 1: Finding your headline topics\n\nIn this section, you’re working out the topics your ideal audience would want to learn (in broad strokes) and the topics you’d like to teach.\n\n** Topics your audience wants to learn:\n\n1. ...\n2. ...\n3. ...\n4. ...\n5. ...\n6. ...\n7. ...\n8. ...\n9. ...\n10. ...\n\n** Topics you want to teach:\n\n1. ...\n2. ...\n3. ...\n4. ...\n5. ...\n6. ...\n7. ...\n8. ...\n9. ...\n10. ...\n\n* Step 2: Breaking Down The Details\n\nNow, it’s time to break up the topics above into smaller points. For example, let’s say I’ve identified a topic my audience wants to learn as writing newsletters. My first sub-point might be “newsletters for beginners”. Then, in step three, this could be broken down into “should you start a newsletter”, “best platform to host a newsletter” and “how to start a newsletter in 3 easy steps”.\n\n** 1: ...\n1. ...\n2. ...\n3. ...\n\n** 2: ...\n1. ...\n2. ...\n3. ...\n\n** 3: ...\n1. ...\n2. ...\n3. ...\n\n** 4: ...\n1. ...\n2. ...\n3. ...\n\n** 5: ...\n1. ...\n2. ...\n3. ...\n\n** 6: ...\n1. ...\n2. ...\n3. ...\n\n** 7: ...\n1. ...\n2. ...\n3. ...\n\n** 8: ...\n1. ...\n2. ...\n3. ...\n\n** 9: ...\n1. ...\n2. ...\n3. ...\n\n** 10: ...\n1. ...\n2. ...\n3. ...\n\n* Step 3: Breaking Down The Breakdown\n\n=REPEAT STEP 2=\n\n** 1: ...\n1. ...\n2. ...\n3. ...\n\n** 2: ...\n1. ...\n2. ...\n3. ...\n\n** 3: ...\n1. ...\n2. ...\n3. ...\n\n** 4: ...\n1. ...\n2. ...\n3. ...\n\n** 5: ...\n1. ...\n2. ...\n3. ...\n\n** 6: ...\n1. ...\n2. ...\n3. ...\n\n** 7: ...\n1. ...\n2. ...\n3. ...\n\n** 8: ...\n1. ...\n2. ...\n3. ...\n\n** 9: ...\n1. ...\n2. ...\n3. ...\n\n** 10: ...\n1. ...\n2. ...\n3. ...\n"
:if-new (file+head "3 📙 RESOURCES/%<%Y%m%d%H%M%S>-${slug}.org" "#+title: 🔢 5 Month of Content in 5 Minutes: ${title}\n#+filetags: :📙RESOURCE:🤔THINKING:🎯IDEA-LIST:\n\n")
:unnarrowed t)))
d | default | plain | %? | :if-new | (file+head %<%Y%m%d%H%M%S>-${slug}.org #+title: ${title} |
CUSTOM FUNCTIONS
;; Return the type of node
(cl-defmethod org-roam-node-type ((node org-roam-node))
(condition-case nil
(file-name-nondirectory
(directory-file-name
(file-name-directory
(file-relative-name
(org-roam-node-file node)
org-roam-directory))))
(error "")))
(defun m3ta/org-roam-node-insert-immediate (arg &rest args)
(interactive "P")
(let* ((key "e")
(template (seq-find (lambda (template) (equal (car template) key)) org-roam-capture-templates)))
(if template
(let ((args (push arg args))
(org-roam-capture-templates (list (append template '(:immediate-finish t)))))
(apply #'org-roam-node-insert args))
(error "Capture template with key %s not found" key))))
(defun m3ta/org-roam-node-insert-immediate-old (arg &rest args)
(interactive "P")
(let ((args (push arg args))
(org-roam-capture-templates (list (append (car org-roam-capture-templates)
'(:immediate-finish t)))))
(apply #'org-roam-node-insert args)))
(defun m3ta/org-roam-filter-by-tag (tag-name)
(lambda (node)
(member tag-name (org-roam-node-tags node))))
(defun m3ta/org-roam-list-notes-by-tag (tag-name)
(mapcar #'org-roam-node-file
(seq-filter
(m3ta/org-roam-filter-by-tag tag-name)
(org-roam-node-list))))
(defun m3ta/org-roam-refresh-agenda-list ()
(interactive)
(setq org-agenda-files (append
(m3ta/org-roam-list-notes-by-tag "👽PROJECT")
(m3ta/org-roam-list-notes-by-tag "♾️AREA")
)))
(defun m3ta/org-roam-project-finalize-hook ()
"Adds the captured project file to `org-agenda-files' if the capture
was not aborted."
;; Remove the hook since it was added temporarily
(remove-hook 'org-capture-after-finalize-hook #'m3ta/org-roam-project-finalize-hook)
;; Add project file to the agenda list if the capture was confirmed
(unless org-note-abort
(with-current-buffer (org-capture-get :buffer)
(add-to-list 'org-agenda-files (buffer-file-name)))))
(defun m3ta/org-roam-find-project ()
(interactive)
;; Add the project file to the agenda after capture is finished
(add-hook 'org-capture-after-finalize-hook #'m3ta/org-roam-project-finalize-hook)
;; Select a project file to open, creating it if necessary
(org-roam-node-find
nil
nil
(m3ta/org-roam-filter-by-tag "👽PROJECT")))
(defun m3ta/org-roam-find-area ()
(interactive)
;; Add the project file to the agenda after capture is finished
(add-hook 'org-capture-after-finalize-hook #'m3ta/org-roam-project-finalize-hook)
;; Select a project file to open, creating it if necessary
(org-roam-node-find
nil
nil
(m3ta/org-roam-filter-by-tag "♾️AREA")))
(defun m3ta/org-roam-capture-inbox ()
(interactive)
(org-roam-capture- :node (org-roam-node-create)
:templates '(("i" "inbox" plain "* %?"
:if-new (file+head "2 ♾️ AREAS/Inbox.org" "#+title: Inbox\n")))))
(defun m3ta/org-roam-capture-task ()
(interactive)
;; Add the project file to the agenda after capture is finished
(add-hook 'org-capture-after-finalize-hook #'m3ta/org-roam-project-finalize-hook)
;; Capture the new task, creating the project file if necessary
(org-roam-capture- :node (org-roam-node-read
nil
(m3ta/org-roam-filter-by-tag "👽PROJECT"))
:templates '(("p" "Projekt" plain "** TODO %?"
:if-new (file+head+olp "1 👽 PROJECTS/%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+category: ${title}\n#+filetags: :👽PROJECT:"
("TASKS"))))))
(defun m3ta/org-roam-capture-area-task ()
(interactive)
;; Add the project file to the agenda after capture is finished
(add-hook 'org-capture-after-finalize-hook #'m3ta/org-roam-project-finalize-hook)
;; Capture the new task, creating the project file if necessary
(org-roam-capture- :node (org-roam-node-read
nil
(m3ta/org-roam-filter-by-tag "♾️AREA"))
:templates '(("p" "Projekt" plain "** TODO %?"
:if-new (file+head+olp "2 ♾️ AREAS/%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+category: ${title}\n#+filetags: :♾️AREA:"
("TASKS"))))))
(defun m3ta/org-roam-capture-node ()
(interactive)
;; Add the project file to the agenda after capture is finished
(add-hook 'org-capture-after-finalize-hook #'m3ta/org-roam-project-finalize-hook)
;; Capture the new task, creating the project file if necessary
(org-roam-capture- :node (org-roam-node-read
nil
(m3ta/org-roam-filter-by-tag "👽PROJECT"))
:templates '(("p" "Projekt" plain "** TODO %?"
:if-new (file+head+olp "1 👽 PROJECTS/%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+category: ${title}\n#+filetags: :👽PROJECT:"
("TASKS"))))))
(defun m3ta/org-roam-capture-area-node ()
(interactive)
;; Add the project file to the agenda after capture is finished
(add-hook 'org-capture-after-finalize-hook #'m3ta/org-roam-project-finalize-hook)
;; Capture the new task, creating the project file if necessary
(org-roam-capture- :node (org-roam-node-read
nil
(m3ta/org-roam-filter-by-tag "♾️AREA"))
:templates '(("p" "Projekt" plain "** TODO %?"
:if-new (file+head+olp "2 ♾️ AREAS/%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+category: ${title}\n#+filetags: :♾️AREA:"
("TASKS"))))))
(defun m3ta/org-roam-copy-todo-to-today ()
(interactive)
(let ((org-refile-keep t) ;; Set this to nil to delete the original!
(org-after-refile-insert-hook #'save-buffer)
today-file
pos)
(save-window-excursion
(org-roam-dailies-capture-today (current-time) "t")
(setq today-file (buffer-file-name))
(setq pos (point)))
;; Only refile if the target file is different than the current file
(unless (equal (file-truename today-file)
(file-truename (buffer-file-name)))
(org-refile nil nil (list "TASKS" today-file nil pos)))))
(add-to-list 'org-after-todo-state-change-hook
(lambda ()
(when (equal org-state "DONE")
(m3ta/org-roam-copy-todo-to-today))))
(defun m3ta/org-fileto-capture-template-and-copy ()
"Replace all new lines with the string '\n' and copy to clipboard."
(interactive)
(save-excursion
(let ((contents (buffer-string))
(modified-contents ""))
(with-temp-buffer
(insert contents)
(goto-char (point-min))
(while (search-forward "\n" nil t)
(replace-match "\\n" nil t))
(setq modified-contents (buffer-string)))
(kill-new (substring-no-properties modified-contents))
(message "Modified text copied to clipboard."))))
(defun m3ta/cut-buffer-and-kill ()
"Kill (cut) the entire buffer content and kill the buffer."
(interactive)
(progn
(clipboard-kill-ring-save (point-min) (point-max))
(kill-this-buffer)))
(map! :leader
:desc "Cut buffer and kill"
"b d" #'m3ta/cut-buffer-and-kill)
(m3ta/org-roam-refresh-agenda-list)
ELFEED
(require 'elfeed-org)
(elfeed-org)
(setq rmh-elfeed-org-files (list "~/wiki/elfeed.org"))
(use-package elfeed-tube
:after elfeed
:demand t
:config
;; (setq elfeed-tube-auto-save-p nil) ; default value
;; (setq elfeed-tube-auto-fetch-p t) ; default value
(elfeed-tube-setup)
:bind (:map elfeed-show-mode-map
("F" . elfeed-tube-fetch)
([remap save-buffer] . elfeed-tube-save)
:map elfeed-search-mode-map
("F" . elfeed-tube-fetch)
([remap save-buffer] . elfeed-tube-save)))
(use-package elfeed-tube-mpv
:bind (:map elfeed-show-mode-map
("C-c C-f" . elfeed-tube-mpv-follow-mode)
("C-c C-w" . elfeed-tube-mpv-where)))
EGLOT
(use-package! breadcrumb
:defer t
:when (modulep! :tools lsp +eglot)
:hook
(prog-mode . breadcrumb-local-mode)
(text-mode . breadcrumb-local-mode)
)
(after! eglot
(set-eglot-client! 'web-mode '("shopify" "theme" "language-server")))
MODES
(add-to-list 'auto-mode-alist '("\\.liquid\\'" . web-mode))
(after! web-mode
(add-to-list 'web-mode-engine-file-regexps '("liquid" . "\\.liquid\\'"))
(setq web-mode-engines-alist
'(("liquid" . "\\.liquid\\'")))
)
(use-package! edit-server
:commands edit-server-start
:init (if after-init-time
(edit-server-start)
(add-hook 'after-init-hook
#'(lambda() (edit-server-start))))
:config (setq edit-server-new-frame-alist
'((name . "Edit with Emacs FRAME")
(top . 200)
(left . 200)
(width . 80)
(height . 25)
(minibuffer . t)
(menu-bar-lines . t)
(window-system . x))))
;; YOU DON'T NEED NONE OF THIS CODE FOR SIMPLE INSTALL
;; IT IS AN EXAMPLE OF CUSTOMIZATION.
(use-package! ellama
:init
;; language you want ellama to translate to
(setopt ellama-language "German")
;; could be llm-openai for example
(require 'llm-ollama)
(setopt ellama-provider
(make-llm-ollama
;; this model should be pulled to use it
;; value should be the same as you print in terminal during pull
:chat-model "dolphin-mixtral:latest"
:embedding-model "dolphin-mixtral:latest"))
;; Predefined llm providers for interactive switching.
;; You shouldn't add ollama providers here - it can be selected interactively
;; without it. It is just example.
(setopt ellama-providers
'(("dolphin-mixtral" . (make-llm-ollama
:chat-model "dolphin-mixtral:latest"
:embedding-model "dolphin-mixtral:latest"))
("dolphin-mixtral" . (make-llm-ollama
:chat-model "dolphin-mixtral:latest"
:embedding-model "dolphin-mixtral:latest"))
)))