summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
Diffstat (limited to 'home')
-rw-r--r--home/config.scm4
-rw-r--r--home/dots/.emacs114
-rw-r--r--home/dots/.emacs.d/BOGO-dark-theme.el2
-rw-r--r--home/dots/.emacs.d/BOGO-theme.el2
-rwxr-xr-xhome/dots/.local/bin/sync-mail1
-rw-r--r--home/dots/.notmuch-config5
-rwxr-xr-xhome/dots/mail/.notmuch/hooks/post-new9
-rwxr-xr-xhome/dots/mail/.notmuch/hooks/pre-new8
8 files changed, 103 insertions, 42 deletions
diff --git a/home/config.scm b/home/config.scm
index b5bc592..8d79291 100644
--- a/home/config.scm
+++ b/home/config.scm
@@ -105,7 +105,6 @@
notmuch
emacs-notmuch
afew
- ungoogled-chromium
pandoc
kmonad
git
@@ -208,6 +207,9 @@
(home-mcron-configuration
(jobs (list
#~(job
+ '(next-hour)
+ "~/.local/bin/org-sync")
+ #~(job
'(next-minute (range 0 60 5))
"~/.local/bin/sync-mail")))))
diff --git a/home/dots/.emacs b/home/dots/.emacs
index 0fadb4e..80b6796 100644
--- a/home/dots/.emacs
+++ b/home/dots/.emacs
@@ -26,6 +26,8 @@
magit
markdown-mode
mastodon
+ org-present
+ visual-fill-column
nix-mode
notmuch
@@ -371,20 +373,23 @@
:bind
(("C-c m" . notmuch-jump-search))
:custom
- ((notmuch-show-logo nil)))
+ (notmuch-address-use-company nil)
+ (notmuch-always-prompt-for-sender 't)
+ (notmuch-mua-user-agent-function 'notmuch)
+ (notmuch-show-logo nil))
(use-package pass
:defer t
:ensure t)
-(defun elfeed-refresh ()
- (interactive)
- (cl-loop for entry in (elfeed-search-selected)
- do (elfeed-untag-1 entry 'unread))
- (elfeed-protocol-fever-reinit "https://freshrss@rss.mccd.space"))
-
(use-package elfeed
:ensure t
+ :init
+ (defun elfeed-refresh ()
+ (interactive)
+ (cl-loop for entry in (elfeed-search-selected)
+ do (elfeed-untag-1 entry 'unread))
+ (elfeed-protocol-fever-reinit "https://freshrss@rss.mccd.space"))
:bind
(:map elfeed-search-mode-map
("G" . elfeed-refresh)))
@@ -648,6 +653,9 @@ Index includes links and headings."
:hook
((server-after-make-frame . exwm-mff-mode)))
+(use-package hide-mode-line
+ :load-path "elisp")
+
(use-package isearch
:defer t
:bind
@@ -826,6 +834,50 @@ Index includes links and headings."
(eldoc-documentation-strategy 'eldoc-documentation-compose-eagerly)
(eldoc-echo-area-use-multiline-p 'truncate-sym-name-if-fit))
+(use-package visual-fill-column
+ :custom
+ (visual-fill-column-width 110)
+ (visual-fill-column-center-text t))
+
+(use-package org-present
+ :after visual-fill-column hide-mode-line
+ :init
+ (defun my/org-present-start ()
+ ;; Center the presentation and wrap lines
+ (visual-fill-column-mode 1)
+ (hide-mode-line-mode 1)
+ (setq-local header-line-format " ")
+ (setq-local image-auto-resize 'fit-width)
+ (setq-local face-remapping-alist
+ '((variable-pitch (:height 1.5 :family "Liberation Serif") variable-pitch)
+ (header-line (:height 4.0) variable-pitch)
+ (org-document-title (:height 1.75) org-document-title)
+ (org-level-1 (:weight bold) org-level-1)
+ (org-code (:height 1.55) org-code)
+ (org-verbatim (:height 1.55) org-verbatim)
+ (org-block (:height 1.25) org-block)
+ (org-block-begin-line (:height 0.7) org-block)))
+ (variable-pitch-mode 1)
+ (flyspell-mode 0)
+ (tab-bar-mode 0)
+ (org-display-inline-images)
+ (visual-line-mode 1))
+
+ (defun my/org-present-end ()
+ ;; Stop centering the document
+ (visual-fill-column-mode 0)
+ (setq-local header-line-format nil)
+ (hide-mode-line-mode 0)
+ (flyspell-mode 1)
+ (setq-local image-auto-resize nil)
+ (setq-local face-remapping-alist '((default variable-pitch default)))
+ (tab-bar-mode 1)
+ (visual-line-mode 0))
+
+ :hook
+ (org-present-mode . my/org-present-start)
+ (org-present-mode-quit . my/org-present-end))
+
(use-package markdown-mode
:defer t
:ensure t
@@ -980,12 +1032,14 @@ Index includes links and headings."
(interactive)
(async-shell-command "org-sync"))
:custom
- (org-complete-tags-always-offer-all-agenda-tags nil)
+ (org-complete-tags-always-offer-all-agenda-tags 't)
(org-use-fast-tag-selection (quote auto))
+ (org-goto-interface 'outline-path-completionp)
+ (org-outline-path-complete-in-steps nil)
(org-refile-targets
'((nil :maxlevel . 4)
- (org-agenda-files :maxlevel . 4)))
- (org-default-notes-file "~/personal-db/notes/lore.org")
+ (org-agenda-text-search-extra-files :maxlevel . 4)))
+ (org-default-notes-file "~/personal-db/notes/inbox.org")
(org-hide-emphasis-markers t)
(org-link-keep-stored-after-insertion t)
(org-startup-folded t)
@@ -1001,15 +1055,6 @@ Index includes links and headings."
'((sequence "TODO(t)" "|" "DONE(d)")
(sequence "UNREAD(u)" "READING(e)" "|" "READ(r)")
(sequence "|" "CANCELED(c)")))
- (org-agenda-custom-commands
- '(("t" "Regular" todo "TODO")
- ("b" "Books" todo "UNREAD")
- ("n" "Agenda and all TODOs"
- ((agenda "today")
- (todo "TODO")))
- ("p" "Pivå and Agenda"
- ((tags-todo "+piva")
- (agenda "")))))
(org-priority-lowest ?E)
(org-priority-faces '((?A . (:weight bold :inherit org-priority))
(?D . (:foreground "gray50" :inherit org-priority))
@@ -1032,8 +1077,8 @@ Index includes links and headings."
(set-face-attribute 'org-meta-line nil :inherit 'fixed-pitch)
:hook
((org-mode . org-indent-mode)
- (org-capture-after-finalize . sync-org)
(org-mode . flyspell-mode)
+ (org-mode . org-display-inline-images)
(org-mode . (lambda ()
(auto-revert-mode 1)))
(org-mode . visual-line-mode)
@@ -1097,7 +1142,7 @@ Index includes links and headings."
:follow (lambda (kmacro) (kmacro-call-macro nil t nil (kbd kmacro))))
(org-link-set-parameters
"goto"
- :follow (lambda (keyword) (lgrep keyword "*.org" "~/personal-db/notes" nil)))
+ :follow (lambda (keyword) (kmacro-call-macro nil t nil (kbd (string-join '("M-x org-agenda <RET> s " keyword " <RET>"))))))
:bind
(("C-c l" . org-store-link)))
@@ -1162,16 +1207,29 @@ Index includes links and headings."
(use-package org-agenda
:defer t
:custom
+ (org-agenda-custom-commands
+ '(("t" "Regular" todo "TODO")
+ ("b" "Books" todo "UNREAD")
+ ("k" "Knowledge"
+ search "" ((org-agenda-files '(""))
+ (org-agenda-overriding-header "Lore")))
+ ("n" "Agenda and all TODOs"
+ ((agenda "today")
+ (todo "TODO")))
+ ("p" "Pivå and Agenda"
+ ((tags-todo "+piva")
+ (agenda "")))))
(org-agenda-files
'("/home/mccd/personal-db/notes/cal-ios.org"
- "/home/mccd/dev/sustainably/README.org"
- "/home/mccd/dev/sustainably/exploration.org"
- "/home/mccd/system/guix.org"
"/home/mccd/personal-db/notes/agenda.org"
"/home/mccd/personal-db/notes/log.org"
- "/home/mccd/personal-db/notes/log.old.org"
+ "/home/mccd/personal-db/notes/log.old.org"))
+ (org-agenda-text-search-extra-files
+ '("/home/mccd/personal-db/notes/lore.org"
+ "/home/mccd/dev/sustainably/exploration.org"
+ "/home/mccd/dev/sustainably/README.org"
"/home/mccd/personal-db/notes/inbox.org"
- "/home/mccd/personal-db/notes/lore.org"))
+ "/home/mccd/system/guix.org"))
(org-agenda-remove-tags t)
(org-agenda-inhibit-startup nil)
:config
@@ -1404,7 +1462,7 @@ Index includes links and headings."
(message-send-mail-function 'message-send-mail-with-sendmail)
(message-sendmail-envelope-from 'header)
(message-mail-user-agent t)
- (mail-user-agent 'message-user-agent)
+ (mail-user-agent 'notmuch-user-agent)
(message-kill-buffer-on-exit t))
(use-package sendmail
@@ -1426,8 +1484,6 @@ Index includes links and headings."
(mastodon-active-user "marcc")
(mastodon-instance-url "https://fosstodon.org"))
-
-
(use-package eww
:custom
(browse-url-browser-function 'eww-browse-url) ; Use eww as the default browser
diff --git a/home/dots/.emacs.d/BOGO-dark-theme.el b/home/dots/.emacs.d/BOGO-dark-theme.el
index 7be4377..56f3289 100644
--- a/home/dots/.emacs.d/BOGO-dark-theme.el
+++ b/home/dots/.emacs.d/BOGO-dark-theme.el
@@ -91,7 +91,7 @@
'(message-header-to ((t nil)))
'(message-header-other ((t nil)))
'(org-drawer ((t nil)))
- '(org-hide ((t (:foreground "#1D1D1D"))))
+ '(org-hide ((t (:foreground "#1D1D1D" :inherit fixed-pitch))))
'(org-done ((t (:inherit (org-agenda-dimmed-todo-face fixed-pitch) :strike-through nil :extend nil :weight bold))))
'(org-todo ((t (:weight bold :inherit fixed-pitch))))
'(org-checkbox ((t (:weight bold :inherit fixed-pitch))))
diff --git a/home/dots/.emacs.d/BOGO-theme.el b/home/dots/.emacs.d/BOGO-theme.el
index d68a25a..bfd0181 100644
--- a/home/dots/.emacs.d/BOGO-theme.el
+++ b/home/dots/.emacs.d/BOGO-theme.el
@@ -95,7 +95,7 @@
'(org-list-dt ((t (:weight bold))))
'(org-agenda-calendar-event ((t nil)))
'(org-drawer ((t :inherit fixed-pitch)))
- '(org-hide ((t (:foreground "#FFFFF8"))))
+ '(org-hide ((t (:foreground "#FFFFF8" :inherit fixed-pitch))))
'(org-done ((t (:inherit (org-agenda-dimmed-todo-face fixed-pitch) :strike-through nil :extend nil :weight bold))))
'(org-todo ((t (:weight bold :inherit fixed-pitch))))
'(org-checkbox ((t (:weight bold :inherit fixed-pitch))))
diff --git a/home/dots/.local/bin/sync-mail b/home/dots/.local/bin/sync-mail
index 575d849..ffb126f 100755
--- a/home/dots/.local/bin/sync-mail
+++ b/home/dots/.local/bin/sync-mail
@@ -1,6 +1,5 @@
#!/usr/bin/env bash
set -e
-#sh ~/mail/.notmuch/hooks/pre-sync
mbsync -a
notmuch new
diff --git a/home/dots/.notmuch-config b/home/dots/.notmuch-config
index 20b3f85..51b771a 100644
--- a/home/dots/.notmuch-config
+++ b/home/dots/.notmuch-config
@@ -9,9 +9,8 @@
# Notmuch will store its database within a sub-directory of the path
# configured here named ".notmuch".
#
-[show]
-extra_headers=X-Mailer,User-Agent
[database]
+path=mail
# User configuration
#
# Here is where you can let notmuch know how you would like to be
@@ -27,6 +26,8 @@ extra_headers=X-Mailer,User-Agent
# recipient list of replies, and will set the From address based on the
# address to which the original email was addressed.
#
+[show]
+extra_headers=X-Mailer,User-Agent
[user]
name=Marc Coquand
primary_email=marc@coquand.email
diff --git a/home/dots/mail/.notmuch/hooks/post-new b/home/dots/mail/.notmuch/hooks/post-new
index ef985c0..be2f5bb 100755
--- a/home/dots/mail/.notmuch/hooks/post-new
+++ b/home/dots/mail/.notmuch/hooks/post-new
@@ -9,5 +9,14 @@ notmuch tag +flight -- path:/home/Archive/Flight/
afew --tag --new
+notmuch search --output=files "path:/.*/INBOX/" tag:home and tag:deleted | while IFS= read -r f; do mv -v $f $(echo $f | sed 's/INBOX/Trash/' | sed 's/,U=[0-9]*:/:/'); done
+notmuch search --output=files "path:/.*/INBOX/" tag:home and tag:receipt and not tag:inbox | while IFS= read -r f; do mv -v $f $(echo $f | sed 's/INBOX/Archive\/Receipt/' | sed 's/,U=[0-9]*:/:/'); done
+notmuch search --output=files "path:/.*/INBOX/" tag:home and tag:flight and not tag:inbox | while IFS= read -r f; do mv -v $f $(echo $f | sed 's/INBOX/Archive\/Flight/' | sed 's/,U=[0-9]*:/:/'); done
+
+notmuch search --output=files "path:/.*/INBOX/" tag:home and not tag:inbox | while IFS= read -r f; do mv -v $f $(echo $f | sed 's/INBOX/Archive/' | sed 's/,U=[0-9]*:/:/'); done
+
+# work
+notmuch search --output=files "path:/.*/INBOX/" tag:work and tag:deleted | while IFS= read -r f; do mv -v $f $(echo $f | sed 's/INBOX/\[Gmail\]\/Trash/' | sed 's/,U=[0-9]*:/:/'); done
+#notmuch search --output=files "path:/.*/INBOX/" and tag:work and not tag:inbox | while IFS= read -r f; do mv -v $f $(echo $f | sed 's/INBOX/\[Gmail\]\/All Mail/' | sed 's/,U=[0-9]*:/:/'); done
diff --git a/home/dots/mail/.notmuch/hooks/pre-new b/home/dots/mail/.notmuch/hooks/pre-new
index 949d909..b39a33c 100755
--- a/home/dots/mail/.notmuch/hooks/pre-new
+++ b/home/dots/mail/.notmuch/hooks/pre-new
@@ -1,8 +1,2 @@
#!/run/current-system/profile/bin/bash
-notmuch search --output=files "path:/.*/INBOX/" tag:home and tag:deleted | while IFS= read -r f; do mv -v $f $(echo $f | sed 's/INBOX/Trash/' | sed 's/,U=[0-9]*:/:/'); done
-
-notmuch search --output=files "path:/.*/INBOX/" tag:home and tag:receipt and not tag:inbox | while IFS= read -r f; do mv -v $f $(echo $f | sed 's/INBOX/Archive\/Receipt/' | sed 's/,U=[0-9]*:/:/'); done
-
-notmuch search --output=files "path:/.*/INBOX/" tag:home and tag:flight and not tag:inbox | while IFS= read -r f; do mv -v $f $(echo $f | sed 's/INBOX/Archive\/Flight/' | sed 's/,U=[0-9]*:/:/'); done
-
-notmuch search --output=files "path:/.*/INBOX/" tag:home and not tag:inbox | while IFS= read -r f; do mv -v $f $(echo $f | sed 's/INBOX/Archive/' | sed 's/,U=[0-9]*:/:/'); done
+# Home