summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-09-27 15:06:53 +0300
committerMarc Coquand <marc@mccd.space>2024-09-27 15:06:53 +0300
commit2534707317835413faeb69d3e32bc29bb339ac4c (patch)
tree81353a14e66f5e87a68c94806b9b071e06bf3eeb /emacs
parent8e51f9099c3152ca8a87e02601c489670cf664f8 (diff)
downloadbsd-2534707317835413faeb69d3e32bc29bb339ac4c.tar.gz
bsd-2534707317835413faeb69d3e32bc29bb339ac4c.tar.bz2
bsd-2534707317835413faeb69d3e32bc29bb339ac4c.zip
.
Diffstat (limited to 'emacs')
-rw-r--r--emacs55
1 files changed, 48 insertions, 7 deletions
diff --git a/emacs b/emacs
index 772ea05..3052222 100644
--- a/emacs
+++ b/emacs
@@ -12,7 +12,6 @@
(setq ring-bell-function 'ignore)
(setq inhibit-startup-screen t)
(setq line-spacing 0.2)
-
(setq display-time-format "%a, %d/%m/%y %H:%M")
(display-time)
(tab-bar-mode)
@@ -43,6 +42,7 @@
elfeed
yasnippet-snippets
mastodon
+ lem
expand-region))
(require 'package)
@@ -92,6 +92,10 @@
;; IDO
(ido-mode t)
+;; Rmail
+(setq rmail-primary-inbox-list '("maildir:///home/mccd/mail/home/INBOX"))
+(setq rmail-preserve-inbox t)
+
;; Eglot
(require 'eglot)
(define-key eglot-mode-map (kbd "C-c r") 'eglot-rename)
@@ -110,7 +114,11 @@
:ensure t
:hook ((before-save . eglot-format-buffer)))
-
+;; HTML
+(add-hook 'html-mode-hook
+ (lambda()
+ (setq sgml-basic-offset 8)
+ (setq indent-tabs-mode t)))
;; X integration
(setq x-select-enable-clipboard t)
(setq x-select-enable-primary t)
@@ -150,9 +158,17 @@
(global-set-key (kbd "C-c l") #'org-store-link)
(global-set-key (kbd "C-c a") #'org-agenda)
(global-set-key (kbd "C-c c") #'org-capture)
+(global-set-key (kbd "C-c s") #'project-find-regexp)
(require 'org)
+(add-hook 'org-agenda-mode-hook
+ (lambda ()
+ (add-hook 'auto-save-hook 'org-save-all-org-buffers nil t)
+ (auto-save-mode)))
(setq org-agenda-files '("~/personal-db/notes"))
+(setq org-refile-targets
+ '((nil :maxlevel . 2)
+ (org-agenda-files :maxlevel . 2)))
(setq org-default-notes-file "~/personal-db/todo.org")
(setq org-log-done 'time)
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
@@ -160,6 +176,7 @@
(add-hook 'org-mode-hook 'visual-line-mode)
(add-hook 'org-mode-hook 'variable-pitch-mode)
(set-face-attribute 'org-block nil :inherit 'fixed-pitch)
+(set-face-attribute 'org-code nil :inherit 'fixed-pitch)
(set-face-attribute 'org-table nil :inherit 'fixed-pitch)
(setq org-capture-templates
@@ -168,10 +185,10 @@
entry (file+headline "~/personal-db/todo.org" "Todo")
"* TODO %?\n%i\n%a\n:Created: %T\n "
:empty-lines 0)
- ("n" "Notes"
- entry (file+headline "~/personal-db/notes/general.org" "Notes")
+ ("n" "Inbox"
+ entry (file+headline "~/personal-db/notes/inbox.org" "Notes")
"** %?"
- :empty-lines 1)))
+ :empty-lines 0)))
;; Magit
(global-set-key (kbd "C-c g") 'magit)
@@ -273,6 +290,29 @@
("/work/INBOX" . ?i))))))))
+;; Lem
+
+(setq lem-instance-url "https://lemmy.sdf.org")
+
+;; Elfeed
+(require 'elfeed)
+;; curl recommend
+(setq elfeed-use-curl t)
+(elfeed-set-timeout 36000)
+(setq elfeed-curl-extra-arguments '("--insecure")) ;necessary for https without a trust certificate
+
+;; setup feeds
+(setq elfeed-protocol-fever-update-unread-only t)
+(setq elfeed-protocol-fever-fetch-category-as-tag t)
+(setq elfeed-protocol-feeds '(("fever+https://freshrss@rss.mccd.space"
+ :api-url "https://rss.mccd.space/api/fever.php"
+ :password (shell-command-to-string "pass show mccd/freshrss"))))
+;; enable elfeed-protocol
+(setq elfeed-protocol-enabled-protocols '(fever))
+(elfeed-protocol-enable)
+(global-set-key (kbd "C-x w") 'elfeed)
+
+
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
@@ -336,10 +376,11 @@
'(mu4e-bookmarks
'((:name "Last 7 days" :query "date:7d..now" :hide-unread t :key 119)
(:name "Messages with images" :query "mime:image/*" :key 112)))
- '(org-agenda-files '("~/personal-db/todo.org"))
+ '(org-agenda-files
+ '("~/builds/sustainably/worklog-marc.org" "/home/mccd/personal-db/notes/inbox.org" "/home/mccd/personal-db/notes/emacs.org" "/home/mccd/personal-db/todo.org"))
'(org-fold-core-style 'overlays)
'(package-selected-packages
- '(yasnippet-snippets elfeed yasnippet smartparens markdown-mode mastodon tldr almost-mono-themes rec-mode magit go-mode expand-region devdocs))
+ '(pdf-tools elfeed-protocol lem yasnippet-snippets elfeed yasnippet smartparens markdown-mode mastodon tldr almost-mono-themes rec-mode magit go-mode expand-region devdocs))
'(tab-bar-format
'(tab-bar-separator tab-bar-format-align-right tab-bar-format-global))
'(yank-from-kill-ring-rotate t))