From e3a5b6e2a09a83946d56d08a3ac86899596db0eb Mon Sep 17 00:00:00 2001 From: Inhji Date: Mon, 25 Mar 2024 10:26:16 +0100 Subject: [PATCH] doom: enable notmuch again, add org-superstar --- config/dot_config/doom/README.org | 15 ++ config/dot_config/doom/config.el | 211 ++++++++++------------------- config/dot_config/doom/init.el | 4 +- config/dot_config/doom/packages.el | 1 + 4 files changed, 88 insertions(+), 143 deletions(-) create mode 100644 config/dot_config/doom/README.org diff --git a/config/dot_config/doom/README.org b/config/dot_config/doom/README.org new file mode 100644 index 0000000..0a6a311 --- /dev/null +++ b/config/dot_config/doom/README.org @@ -0,0 +1,15 @@ +#+TITLE: Doom Config + + +* Sample .netrc + +With Posteo.de, I can sync my calendar to Org Mode and my mails with notmuch. Configuring the password in this (unencrypted) .netrc was a bit tricky, bit this config seems to work for now. The order of the entries matters! + +#+begin_src netrc +# caldav sync +# this works with caldav, but trips up offlineimap +# machine posteo.de:8443 port https login johnnie@posteo.de password PASSWORD +machine posteo.de:8443 login johnnie@posteo.de password PASSWORD +# offlineimap +machine posteo.de login johnnie@posteo.de password PASSWORD +#+end_src diff --git a/config/dot_config/doom/config.el b/config/dot_config/doom/config.el index 2b480ed..977326a 100644 --- a/config/dot_config/doom/config.el +++ b/config/dot_config/doom/config.el @@ -1,15 +1,13 @@ ;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- (defun org-path-find-file () - "Open org-path in find file" - (interactive) - (doom-project-find-file +user-org-path)) + "Open org-path in find file" + (interactive) + (doom-project-find-file +user-org-path)) (defun org-path (filename) - "Expand filename relative to the default org-path" - (expand-file-name filename +user-org-path)) - - + "Expand filename relative to the default org-path" + (expand-file-name filename +user-org-path)) (defun my-org-inline-css-hook (exporter) "Insert custom inline css" @@ -51,8 +49,6 @@ 'face 'doom-dashboard-banner))) (map! "C-M-+" #'doom/increase-font-size) - -;; NOTE: Does not work in org-mode src blocks (map! "C-#" #'comment-line) (map! :leader @@ -69,10 +65,15 @@ :map org-mode-map :desc "View habit stats" "g s" #'org-habit-stats-view-habit-at-point) + ;; Basic User Settings (setq user-full-name "Jonathan Jenne" user-mail-address "johnnie@posteo.de") +;; Set backend for finding auth credentials +(setq auth-sources + '("~/.authinfo" "~/.authinfo.gpg" "~/.netrc")) + ;; Default Shell ;; Useful if default system shell is not bash (setq shell-file-name (executable-find "bash")) @@ -97,8 +98,12 @@ (remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-footer) (remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-loaded) -;; Themes +(use-package! notmuch + :config + (setq +notmuch-sync-backend 'offlineimap + +notmuch-home-function (lambda () (notmuch-search "tag:inbox")))) +;; Org Mode (use-package! org :config (setq ;; General @@ -135,7 +140,8 @@ ;; Org Todo org-todo-keywords '((sequence "TODO(t)" "DOING(g)" "WAIT(w)" "|" "DONE(d)" "CANCEL(c)") - (sequence "THIS(T)" "EXAMPLE")) + (sequence "THIS(T)" "EXAMPLE") + (sequence "[ ]" "[?]" "|" "[x]")) ;; Org Capture +org-capture-notes-file (org-path "Notes.org") @@ -145,8 +151,21 @@ +org-capture-nepali-file (org-path "Nepali.org") org-capture-templates '(("t" "Personal Todo" entry - (file+headline +org-capture-todo-file "Todo") - "* TODO %?\n" :prepend t) + (file +org-capture-todo-file) + "* TODO %^{Todo Item}" :prepend t :immediate-finish t) + + ("n" "Nepali") + ("nw" "Nepali Word" entry + (file+headline +org-capture-nepali-file "Nepali Words") + "* %^{Nepali Word} :drill:\n%\\1\n** Answer\n%^{Translation}" :prepend t :immediate-finish t) + + ("s" "Shopping Item" entry + (file +org-capture-todo-file) + "* TODO %^{Shopping Item} :shopping:" :prepend t :immediate-finish t) + + ("j" "Daily Journal" entry + (file+olp+datetree +org-capture-journal-file) + "* %U %?\n" :prepend t) ("r" "Recipe" entry (file+headline +org-capture-cooking-file "Unsorted") @@ -168,38 +187,30 @@ - [ ] Ingredient 1 -1. First Step") +1. First Step"))) - ("n" "Nepali") - - ("nw" "Nepali Word" entry - (file+headline +org-capture-nepali-file "Nepali Words") - "* %^{Nepali Word} :drill:\n%\\1\n** Answer\n%^{Translation}" :prepend t :immediate-finish t) - - ("j" "Daily Journal" entry - (file+olp+datetree +org-capture-journal-file) - "* %U %?\n" :prepend t))) :hook (org-after-todo-state-change . org-habit-stats-update-properties) :init (add-to-list 'org-modules 'org-habit) (add-hook 'org-export-before-processing-functions 'my-org-inline-css-hook)) -(after! doom-modeline - (setq doom-modeline-battery t) - (setq doom-modeline-major-mode-icon t)) - -(add-hook 'doom-after-init-hook #'display-battery-mode) -(add-hook 'doom-after-init-hook #'display-time-mode) - (use-package! drag-stuff :init (drag-stuff-global-mode t)) (use-package! elfeed - :init - (setq elfeed-feeds - '(("https://www.giessen.de/media/rss/Presse.xml" news local) - ("https://adactio.com/journal/rss" tech) + :config + (evil-define-key 'normal elfeed-show-mode-map + (kbd "J") 'elfeed-goodies/split-show-next + (kbd "K") 'elfeed-goodies/split-show-prev) + (evil-define-key 'normal elfeed-search-mode-map + (kbd "J") 'elfeed-goodies/split-show-next + (kbd "K") 'elfeed-goodies/split-show-prev) + :config + (setq elfeed-goodies/entry-pane-size 0.5 + elfeed-search-filter "@2-week-ago +unread +unread" + elfeed-feeds + '(("https://adactio.com/journal/rss" tech) ("https://andregarzia.com/feeds/all.atom.xml" tech) ("https://ar.al/index.xml" tech activism) ("https://archlinux.org/feeds/news/" tech linux) @@ -243,9 +254,9 @@ ("https://tarnkappe.info/feed" tech piracy) ("https://theoatmeal.com/feed/rss" comics) ("https://victoria.dev/atom.xml" tech) - ("https://warandpeas.com/feed/" comis) + ("https://warandpeas.com/feed/" comics) ("https://warnung.bund.de/api31/mowas/rss/065310000000.rss" alerts) - ("https://webcomicname.com/rss" comis) + ("https://webcomicname.com/rss" comics) ("https://webdevlaw.uk/feed/" tech activism) ("https://www.commitstrip.com/en/feed/" comics) ("https://www.drugsandwires.fail/feed/" ) @@ -266,85 +277,16 @@ ("https://www.youtube.com/feeds/videos.xml?channel_id=UCzg5UMJ62uoKHTkq5bgkp5g" youtube) ("https://zerforschung.org/index.xml" activism)))) -;; (use-package! elfeed -;; :config -;; (setq elfeed-feeds -;; '(("https://www.giessen.de/media/rss/Presse.xml" '(news local)) -;; ("https://adactio.com/journal/rss" '(tech)) -;; ("https://andregarzia.com/feeds/all.atom.xml" '(tech)) -;; ("https://ar.al/index.xml" '(tech activism)) -;; ("https://archlinux.org/feeds/news/" '(tech linux)) -;; ("https://ashfurrow.com/feed.xml" '(health)) -;; ("https://bachrauf.org/feed/" '(activism)) -;; ("https://beko.famkos.net/feed/" '(tech)) -;; ("https://blog.elementary.io/feed.xml" '(tech release)) -;; ("https://blog.gls.de/feed/" '(finances)) -;; ("https://dasklima.podigee.io/feed/mp3" '(podcast)) -;; ("https://forgefriends.org/index.xml" '(tech)) -;; ("https://forgejo.org/rss.xml" '(release tech)) -;; ("https://github.com/InfiniTimeOrg/InfiniTime/releases.atom" '(github release)) -;; ("https://github.com/actualbudget/actual/releases.atom" '(github release)) -;; ("https://github.com/ceciliamay/obsidianmd-theme-primary/releases.atom" '(github release)) -;; ("https://github.com/dani-garcia/vaultwarden/releases.atom" '(github release)) -;; ("https://github.com/extrawurst/gitui/releases.atom" '(github release)) -;; ("https://github.com/microg/GmsCore/releases.atom" '(github release)) -;; ("https://github.com/noatpad/obsidian-banners/releases.atom" '(github release)) -;; ("https://github.com/superseriousbusiness/gotosocial/releases.atom" '(github release)) -;; ("https://grimgrains.com/links/rss.xml" '(food)) -;; ("https://jlelse.blog/.rss" '(tech)) -;; ("https://katapult-magazin.de/feed/rss" '(activism)) -;; ("https://katja-diehl.de/feed/" '(activism)) -;; ("https://kevquirk.com/feed" '(tech)) -;; ("https://maudb.gitlab.io/dok/rss.xml" '(food autonomy)) -;; ("https://miniflux.app/feed.xml" '(tech release)) -;; ("https://mntre.com/reform_md.atom" '(tech)) -;; ("https://nesslabs.com/feed" '(productivity)) -;; ("https://newsfeed.zeit.de/serie/die-kaenguru-comics" '(comics)) -;; ("https://nicolevanderhoeven.com/index.xml" '(tech)) -;; ("https://noyb.eu/en/rss" '(activism)) -;; ("https://nullprogram.com/feed/" '(tech)) -;; ("https://obsidian.md/feed.xml" '(tech release)) -;; ("https://ohhelloana.blog/feed.xml" '(tech)) -;; ("https://pluralistic.net/feed/" '(tech activism)) -;; ("https://shkspr.mobi/blog/feed/" '(tech)) -;; ("https://smallstar.space/feed/" '(religion)) -;; ("https://snikket.org/blog/index.xml" '(tech release)) -;; ("https://social.prepedia.org/@FediNINA_Giessen.rss" '(alerts)) -;; ("https://solar.lowtechmagazine.com/posts/index.xml" '(tech sustainability)) -;; ("https://tarnkappe.info/feed" '(tech piracy)) -;; ("https://theoatmeal.com/feed/rss" '(comics)) -;; ("https://victoria.dev/atom.xml" '(tech)) -;; ("https://warandpeas.com/feed/" '(comis)) -;; ("https://warnung.bund.de/api31/mowas/rss/065310000000.rss" '(alerts)) -;; ("https://webcomicname.com/rss" '(comis)) -;; ("https://webdevlaw.uk/feed/" '(tech activism)) -;; ("https://www.commitstrip.com/en/feed/" '(comics)) -;; ("https://www.drugsandwires.fail/feed/" '()) -;; ("https://www.kuketz-blog.de/category/artikel/feed/" '(tech)) -;; ("https://www.kuketz-blog.de/category/microblog/feed/" '(tech)) -;; ("https://www.mein-nepal.de/feed/" '(nepal)) -;; ("https://www.oglaf.com/feeds/rss/" '(comics nsfw)) -;; ("https://www.schoenescheisse.de/feed/" '(comics)) -;; ("https://www.smbc-comics.com/comic/rss" '(comics)) -;; ("https://www.tomorrow.one/de-DE/feed.xml" '(sustainability finances)) -;; ("https://www.volksverpetzer.de/feed/" '(activism)) -;; ("https://www.wetell.de/feed/" '(service sustainability)) -;; ("https://www.youtube.com/feeds/videos.xml?channel_id=UC0e3QhIYukixgh5VVpKHH9Q" youtube) -;; ("https://www.youtube.com/feeds/videos.xml?channel_id=UCCJ-NJtqLQRxuaxHZA9q6zg" youtube) -;; ("https://www.youtube.com/feeds/videos.xml?channel_id=UClZbO3wehSIsPUKLx_X5caw" youtube) -;; ("https://www.youtube.com/feeds/videos.xml?channel_id=UCtUbO6rBht0daVIOGML3c8w" youtube) -;; ("https://www.youtube.com/feeds/videos.xml?channel_id=UCyNtlmLB73-7gtlBz00XOQQ" youtube) -;; ("https://www.youtube.com/feeds/videos.xml?channel_id=UCzg5UMJ62uoKHTkq5bgkp5g" youtube) -;; ("https://zerforschung.org/index.xml" '(activism))))) - +(use-package! expand-region + :bind ("C-รค" . er/expand-region)) (use-package! heaven-and-hell :ensure t :config (setq heaven-and-hell-theme-type 'dark ;; Omit to use light by default heaven-and-hell-themes - '((light . doom-nord-light) - (dark . doom-nord)) ;; Themes can be the list: (dark . (tsdh-dark wombat)) + '((light . modus-operandi) + (dark . modus-vivendi)) ;; Themes can be the list: (dark . (tsdh-dark wombat)) heaven-and-hell-load-theme-no-confirm t) :hook (after-init . heaven-and-hell-init-hook) :bind (("" . heaven-and-hell-toggle-theme))) @@ -366,8 +308,6 @@ :config (setq nov-text-width 70)) -(add-hook! 'nov-mode-hook '(olivetti-mode)) - (use-package! olivetti :init (add-hook! 'nov-mode-hook 'olivetti-mode) @@ -375,9 +315,6 @@ '(olivetti-mode (lambda () (display-line-numbers-mode -1))))) -;; (after! olivetti (setq olivetti-body-width 70)) -;; (add-hook! 'org-mode-hook '(olivetti-mode (lambda () (display-line-numbers-mode -1)))) - (use-package! org-auto-tangle :defer t :config (setq org-auto-tangle-default nil) @@ -385,43 +322,35 @@ (use-package! org-caldav :config - (setq org-caldav-url "https://posteo.de:8443/calendars/johnnie" + (setq auth-source-debug t + org-caldav-url "https://posteo.de:8443/calendars/johnnie" org-caldav-calendar-id "default" org-caldav-inbox (org-path "Calendar.org") org-caldav-files nil + org-caldav-days-in-past 7 + org-caldav-delete-calendar-entries 'never org-icalendar-timezone "Europe/Berlin")) -;; URL of the caldav server -;; (setq org-caldav-url "https://posteo.de:8443/calendars/johnnie/default") - -;; calendar ID on server -;; (setq org-caldav-calendar-id "default") - -;; Org filename where new entries from calendar stored -;; (setq org-caldav-inbox (org-path "Calendar.org")) - -;; Additional Org files to check for calendar events -;; (setq org-caldav-files nil) - -;; Usually a good idea to set the timezone manually -;; (setq org-icalendar-timezone "Europe/Berlin") - -(after! org-drill +(use-package! org-drill + :config (setq org-drill-scope 'agenda)) -(after! org-noter - (setq org-noter-notes-search-path '("~/Notes/Org")) - (setq org-noter-always-create-frame nil) - (setq org-noter-doc-split-fraction '(0.75 . 0.75)) - (setq org-noter-default-notes-file-names '())) +(use-package! org-noter + :config + (setq org-noter-notes-search-path '("~/Notes/Org") + org-noter-always-create-frame nil + org-noter-doc-split-fraction '(0.75 . 0.75) + org-noter-default-notes-file-names '())) (use-package! org-roam - :config (setq org-roam-directory "~/Notes/Org/Roam" - org-roam-dailies-directory "Daily")) + :config + (setq org-roam-directory "~/Notes/Org/Roam" + org-roam-dailies-directory "Daily")) + +(use-package! org-superstar + :hook + (org-mode . (lambda () (org-superstar-mode 1)))) -;; (after! org-roam -;; (setq org-roam-directory "~/Notes/Org/Roam") -;; (setq org-roam-dailies-directory "Daily")) (use-package! org-super-agenda :config diff --git a/config/dot_config/doom/init.el b/config/dot_config/doom/init.el index 5b9f7e6..1d1d7b8 100644 --- a/config/dot_config/doom/init.el +++ b/config/dot_config/doom/init.el @@ -179,7 +179,7 @@ :email ;;(mu4e +org +gmail) - ;;notmuch + notmuch ;;(wanderlust +gmail) :app @@ -187,7 +187,7 @@ ;;emms ;;everywhere ; *leave* Emacs!? You must be joking ;;irc ; how neckbeards socialize - (rss +org) ; emacs as an RSS reader + rss ; emacs as an RSS reader ;;twitter ; twitter client https://twitter.com/vnought :config diff --git a/config/dot_config/doom/packages.el b/config/dot_config/doom/packages.el index 2553e01..5301cd8 100644 --- a/config/dot_config/doom/packages.el +++ b/config/dot_config/doom/packages.el @@ -20,6 +20,7 @@ (package! org-habit-stats) (package! org-noter) (package! org-super-agenda) +(package! org-superstar) ;; To install a package directly from a remote git repo, you must specify a ;; `:recipe'. You'll find documentation on what `:recipe' accepts here: