2024-10-03 00:41:07 +02:00
|
|
|
|
;; -*- lexical-binding: t -*-
|
|
|
|
|
;; DO NOT EDIT THIS FILE
|
|
|
|
|
;; This file was generated from the .config/doom/README.org file
|
|
|
|
|
;; in the following repo: https://git.bajsicki.com/phil/dot/
|
|
|
|
|
|
2023-08-12 16:45:26 +02:00
|
|
|
|
(setq user-full-name "Phil Bajsicki")
|
2023-04-15 17:25:11 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq-default backup-inhibited t)
|
2023-08-12 16:45:26 +02:00
|
|
|
|
(setq global-auto-revert-mode t)
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq-default indent-tabs-mode t)
|
|
|
|
|
|
|
|
|
|
(setq find-file-visit-truename t)
|
|
|
|
|
|
2023-08-12 16:45:26 +02:00
|
|
|
|
(setq auth-sources '("~/.authinfo"))
|
2023-04-15 17:25:11 +02:00
|
|
|
|
|
2023-09-21 02:46:05 +02:00
|
|
|
|
(setq locale-coding-system 'utf-8)
|
|
|
|
|
(set-terminal-coding-system 'utf-8)
|
|
|
|
|
(set-keyboard-coding-system 'utf-8)
|
|
|
|
|
(set-clipboard-coding-system 'utf-8)
|
|
|
|
|
(prefer-coding-system 'utf-8)
|
2023-08-14 15:56:03 +02:00
|
|
|
|
|
2023-10-15 22:16:55 +02:00
|
|
|
|
(setq langtool-java-bin "/usr/bin/java")
|
|
|
|
|
|
2023-08-12 16:45:26 +02:00
|
|
|
|
(after! counsel
|
|
|
|
|
(setq counsel-outline-display-style 'title))
|
2023-04-15 17:25:11 +02:00
|
|
|
|
|
2023-08-22 13:06:03 +02:00
|
|
|
|
(load-theme 'doom-one t)
|
|
|
|
|
(doom-themes-neotree-config)
|
|
|
|
|
(doom-themes-org-config)
|
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(menu-bar-mode -1)
|
|
|
|
|
(tool-bar-mode -1)
|
|
|
|
|
(scroll-bar-mode -1)
|
|
|
|
|
|
|
|
|
|
(modify-all-frames-parameters
|
|
|
|
|
'((right-divider-width . 0)
|
|
|
|
|
(internal-border-width . 0)))
|
|
|
|
|
(dolist (face '(window-divider
|
|
|
|
|
window-divider-first-pixel
|
|
|
|
|
window-divider-last-pixel))
|
|
|
|
|
(face-spec-reset-face face)
|
|
|
|
|
(set-face-foreground face (face-attribute 'default :background)))
|
|
|
|
|
(set-face-background 'fringe (face-attribute 'default :background))
|
|
|
|
|
|
|
|
|
|
(set-frame-parameter nil 'alpha-background 85)
|
|
|
|
|
(add-to-list 'default-frame-alist '(alpha-background . 85))
|
|
|
|
|
|
2024-06-06 01:26:00 +02:00
|
|
|
|
(setq doom-themes-enable-bold t
|
|
|
|
|
doom-themes-enable-italic t
|
|
|
|
|
doom-font (font-spec :family "Iosevka" :size 14)
|
|
|
|
|
doom-big-font (font-spec :family "Iosevka" :size 16)
|
|
|
|
|
;; doom-variable-pitch-font (font-spec :family "Iosevka" :size 14)
|
|
|
|
|
doom-unicode-font (font-spec :family "Iosevka"))
|
|
|
|
|
;; doom-serif-font (font-spec :family "IBM Plex Mono" :size 10 :weight 'light))
|
|
|
|
|
|
|
|
|
|
;; (set-face-attribute 'default nil :family "Iosevka")
|
|
|
|
|
;; (set-face-attribute 'variable-pitch nil :family "Iosevka Aile")
|
|
|
|
|
;; (set-face-attribute 'org-modern-symbol nil :family "Iosevka")
|
2023-10-15 22:16:55 +02:00
|
|
|
|
|
|
|
|
|
(ligature-set-ligatures 't '("www"))
|
|
|
|
|
;; Enable traditional ligature support in eww-mode, if the
|
|
|
|
|
;; `variable-pitch' face supports it
|
|
|
|
|
(ligature-set-ligatures 'eww-mode '("ff" "fi" "ffi"))
|
|
|
|
|
;; Enable all Cascadia Code ligatures in programming modes
|
|
|
|
|
(ligature-set-ligatures 'org-mode '("|||>" "<|||" "<==>" "<!--" "####" "~~>" "***" "||=" "||>"
|
|
|
|
|
":::" "::=" "=:=" "===" "==>" "=!=" "=>>" "=<<" "=/=" "!=="
|
|
|
|
|
"!!." ">=>" ">>=" ">>>" ">>-" ">->" "->>" "-->" "---" "-<<"
|
|
|
|
|
"<~~" "<~>" "<*>" "<||" "<|>" "<$>" "<==" "<=>" "<=<" "<->"
|
|
|
|
|
"<--" "<-<" "<<=" "<<-" "<<<" "<+>" "</>" "###" "#_(" "..<"
|
|
|
|
|
"..." "+++" "/==" "///" "_|_" "www" "&&" "^=" "~~" "~@" "~="
|
|
|
|
|
"~>" "~-" "**" "*>" "*/" "||" "|}" "|]" "|=" "|>" "|-" "{|"
|
|
|
|
|
"[|" "]#" "::" ":=" ":>" ":<" "$>" "==" "=>" "!=" "!!" ">:"
|
|
|
|
|
">=" ">>" ">-" "-~" "-|" "->" "--" "-<" "<~" "<*" "<|" "<:"
|
|
|
|
|
"<$" "<=" "<>" "<-" "<<" "<+" "</" "#{" "#[" "#:" "#=" "#!"
|
|
|
|
|
"##" "#(" "#?" "#_" "%%" ".=" ".-" ".." ".?" "+>" "++" "?:"
|
|
|
|
|
"?=" "?." "??" ";;" "/*" "/=" "/>" "//" "__" "~~" "(*" "*)"
|
|
|
|
|
"\\\\" "://"))
|
|
|
|
|
;; Enables ligature checks globally in all buffers. You can also do it
|
|
|
|
|
;; per mode with `ligature-mode'.
|
|
|
|
|
(global-ligature-mode t)
|
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq display-line-numbers-type 'relative) ;; best honestly
|
2023-09-21 02:46:05 +02:00
|
|
|
|
(setq-default global-visual-line-mode t)
|
|
|
|
|
(setq column-number-mode t)
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq next-screen-context-lines 4)
|
|
|
|
|
(setq x-stretch-cursor t)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2023-09-21 02:46:05 +02:00
|
|
|
|
(global-set-key "\C-g" 'keyboard-quit)
|
|
|
|
|
(global-set-key "\C-cu" 'browse-url-chrome)
|
2023-04-15 17:25:11 +02:00
|
|
|
|
|
2023-12-20 03:08:40 +01:00
|
|
|
|
(setq straight-repository-branch "develop")
|
2023-04-15 17:25:11 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
;; must be set before `org` is loaded
|
2023-12-20 03:08:40 +01:00
|
|
|
|
|
|
|
|
|
(add-to-list 'auto-mode-alist
|
|
|
|
|
'("\\.org\\'" . org-mode))
|
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq-default calendar-week-start-day 1)
|
2023-12-20 03:08:40 +01:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-contacts-files '("~/enc/org/people.org"))
|
|
|
|
|
(setq org-directory "~/enc/org/")
|
2023-12-20 03:08:40 +01:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-agenda-files (directory-files-recursively "~/enc/org/" ".org$"))1
|
2023-12-20 03:08:40 +01:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-refile-targets '((nil :maxlevel . 9)
|
|
|
|
|
(org-agenda-files :maxlevel . 9)))
|
|
|
|
|
(setq org-outline-path-complete-in-steps nil)
|
|
|
|
|
(setq org-refile-use-outline-path 'file)
|
2023-09-21 02:46:05 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-image-actual-width '(0.8))
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-10-03 00:41:07 +02:00
|
|
|
|
(setq org-footnote-auto-adjust t)
|
|
|
|
|
(setq org-footnote-define-inline t)
|
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(global-org-modern-mode)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-read-date-prefer-future t)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-reverse-note-order nil)
|
|
|
|
|
|
|
|
|
|
(setq org-blank-before-new-entry (quote ((heading . nil)
|
|
|
|
|
(plain-list-item . nil))))
|
2023-09-21 02:46:05 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-catch-invisible-edits "smart")
|
2023-09-21 02:46:05 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-special-ctrl-a/e t)
|
|
|
|
|
(setq org-special-ctrl-k t)
|
2023-04-15 17:25:11 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-yank-adjusted-subtrees t)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-M-RET-may-split-line '((headline . t)
|
|
|
|
|
(item . t)
|
|
|
|
|
(default . nil)))
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-insert-heading-respect-content nil)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-footnote-section nil)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-log-done (quote time)
|
|
|
|
|
org-log-into-drawer t
|
|
|
|
|
org-clock-into-drawer t)
|
|
|
|
|
|
|
|
|
|
(setq org-treat-insert-todo-heading-as-state-change nil)
|
|
|
|
|
|
|
|
|
|
(setq org-use-property-inheritance nil)
|
|
|
|
|
;;(setq org-use-property-inheritance '(category columns archive logging))
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2023-08-12 16:45:26 +02:00
|
|
|
|
(setq-default org-enforce-todo-dependencies t)
|
2023-09-21 02:46:05 +02:00
|
|
|
|
(setq org-enforce-todo-checkbox-dependencies t)
|
2023-04-15 17:25:11 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-deadline-warning-days 7)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-provide-todo-statistics t
|
|
|
|
|
org-hierarchical-todo-statistics t)
|
2023-04-15 17:25:11 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-todo-repeat-to-state "LOOP")
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2023-12-20 03:08:40 +01:00
|
|
|
|
(setq org-todo-keywords
|
|
|
|
|
'((sequence
|
2024-06-06 01:26:00 +02:00
|
|
|
|
"INBOX(i!)"
|
|
|
|
|
"TASK(t!)" ; A task that needs doing & is ready to do
|
|
|
|
|
"PROJ(p!)" ; A project, which usually contains other tasks
|
|
|
|
|
"LOOP(r!)" ; A recurring task
|
|
|
|
|
"WAIT(w!)" ; Something external is holding up this task
|
|
|
|
|
"HOLD(h!)" ; This task is paused/on hold because of me
|
2023-12-20 03:08:40 +01:00
|
|
|
|
"|"
|
2024-06-06 01:26:00 +02:00
|
|
|
|
"DONE(d!@)" ; Task successfully completed
|
|
|
|
|
"KILL(k!@)") ; Task was cancelled, aborted or is no longer applicable
|
2023-12-20 03:08:40 +01:00
|
|
|
|
(sequence
|
|
|
|
|
"DECIDE()" ; for making decisions
|
|
|
|
|
"|"
|
2024-06-06 01:26:00 +02:00
|
|
|
|
"OKAY(o!)" ; okay as-is
|
|
|
|
|
"YES(y!)" ; take action
|
|
|
|
|
"NO(n!)")) ; don't take action
|
2023-12-20 03:08:40 +01:00
|
|
|
|
org-todo-keyword-faces
|
|
|
|
|
'(
|
|
|
|
|
("INBOX" :foreground "cyan" :weight bold)
|
|
|
|
|
("TASK" :foreground "purple" :weight bold)
|
|
|
|
|
("PROJ" :foreground "violet" :weight bold)
|
|
|
|
|
("LOOP" :foreground "magenta" :weight bold)
|
|
|
|
|
("WAIT" :foreground "yellow" :weight bold)
|
|
|
|
|
("HOLD" :foreground "orange" :weight bold)
|
|
|
|
|
("DONE" :foreground "green" :weight bold)
|
|
|
|
|
("KILL" :foreground "grey" :weight bold)))
|
2023-09-21 02:46:05 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-fontify-done-headline t)
|
|
|
|
|
(custom-set-faces
|
|
|
|
|
'(org-done ((t (:foreground "PaleGreen"
|
|
|
|
|
:weight normal
|
|
|
|
|
:strike-through t))))
|
|
|
|
|
'(org-headline-done
|
|
|
|
|
((((class color) (min-colors 16) (background dark))
|
|
|
|
|
(:foreground "LightSalmon" :strike-through t)))))
|
|
|
|
|
|
2024-06-06 01:26:00 +02:00
|
|
|
|
(setq org-capture-templates '(("t" "inbox" entry (file+headline "~/enc/org/agenda.org" "Inbox") "* %i%?")
|
|
|
|
|
("i" "idea" entry (file+headline "~/enc/org/agenda.org" "Ideas") "* %?")
|
|
|
|
|
("d" "reminder" entry (file+headline "~/enc/org/agenda.org" "Reminders") "* %i%? \n %U")
|
|
|
|
|
("p" "person" entry (file+headline "~/enc/org/people.org" "Sort")
|
2023-08-14 15:56:03 +02:00
|
|
|
|
"* %(org-contacts-template-name)
|
2023-04-15 17:25:11 +02:00
|
|
|
|
:PROPERTIES:
|
|
|
|
|
:EMAIL: %(org-contacts-template-email)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
:PHONE:
|
2023-04-15 17:25:11 +02:00
|
|
|
|
:ALIAS:
|
|
|
|
|
:NICKNAME:
|
|
|
|
|
:IGNORE:
|
|
|
|
|
:ICON:
|
|
|
|
|
:NOTE:
|
|
|
|
|
:ADDRESS:
|
|
|
|
|
:BIRTHDAY:
|
|
|
|
|
:END:")))
|
2023-08-12 16:45:26 +02:00
|
|
|
|
|
2024-10-03 00:41:07 +02:00
|
|
|
|
(global-set-key "\C-cl" 'org-store-link)
|
|
|
|
|
(global-set-key "\C-cnn" 'org-capture)
|
|
|
|
|
|
|
|
|
|
(global-set-key "\C-cia" '(lambda ()(interactive)
|
|
|
|
|
(org-time-stamp '(16))))
|
|
|
|
|
(global-set-key "\C-cii" '(lambda () (interactive)
|
|
|
|
|
(org-time-stamp-inactive '(16))))
|
|
|
|
|
|
|
|
|
|
(setq org-roam-v2-ack t)
|
|
|
|
|
(setq org-roam-completion-everywhere t)
|
|
|
|
|
(setq org-roam-directory
|
|
|
|
|
(file-truename "~/enc/org/roam"))
|
|
|
|
|
(org-roam-db-autosync-mode)
|
|
|
|
|
(org-roam-db-autosync-enable)
|
|
|
|
|
|
|
|
|
|
(setq org-roam-capture-templates
|
|
|
|
|
'(("n" "default" plain
|
|
|
|
|
"%?"
|
|
|
|
|
:if-new (file+head "${slug}.org" "#+title: ${title}\n#+category: ${title}\n#+filetags: \n")
|
|
|
|
|
:empty-lines 1
|
|
|
|
|
:unnarrowed t)
|
|
|
|
|
("t" "Therapy" plain
|
|
|
|
|
"#+title: ${title}\n"
|
|
|
|
|
:if-new (file+head "therapy/therapy-${slug}.org" "#+title: ${title}\n#+category: 📗 ${title}\n#+filetags: 📗\n")
|
|
|
|
|
:empty-lines 1
|
|
|
|
|
:unnarrowed)))
|
|
|
|
|
|
|
|
|
|
(define-prefix-command 'org-roam-map)
|
|
|
|
|
(global-set-key "\C-r" 'org-roam-map)
|
|
|
|
|
(define-key org-roam-map "o" 'org-roam-buffer-toggle)
|
|
|
|
|
(define-key org-roam-map "f" 'org-roam-node-find)
|
|
|
|
|
(define-key org-roam-map "i" 'org-roam-node-insert)
|
|
|
|
|
(define-key org-roam-map "n" 'org-roam-capture)
|
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(defun my-dir-to-org (dir org-file)
|
|
|
|
|
"Create a file ORG-FILE which has all txt files in DIR as linked headlines
|
|
|
|
|
and the contents of the files below the headlines."
|
|
|
|
|
(interactive "DDirectory to convert: \nFFilename: ")
|
|
|
|
|
(let ((files (directory-files
|
|
|
|
|
dir t ".*\\.txt\\'")))
|
|
|
|
|
(with-temp-file org-file
|
|
|
|
|
(dolist (file files)
|
|
|
|
|
(insert (concat "* " (file-name-nondirectory file) "\n\n"))
|
|
|
|
|
(insert-file-contents file)
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(insert "\n")))))
|
|
|
|
|
|
|
|
|
|
(defun my-dir-to-org-with-links (dir org-file)
|
|
|
|
|
"Create a file ORG-FILE which has all txt files in DIR as linked headlines
|
|
|
|
|
and the contents of the files below the headlines."
|
|
|
|
|
(interactive "DDirectory to convert: \nFFilename: ")
|
|
|
|
|
(let ((files (directory-files
|
|
|
|
|
dir t ".*\\.txt\\'")))
|
|
|
|
|
(with-temp-file org-file
|
|
|
|
|
(dolist (file files)
|
|
|
|
|
(insert (concat "* " "[[" file "][" (file-name-nondirectory file) "]]\n\n"))
|
|
|
|
|
(insert-file-contents file)
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(insert "\n")))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun my-mass-conversion (source-dir target-dir)
|
|
|
|
|
"Create one org file per directory of SOURCE-DIR inside TARGET-DIR."
|
|
|
|
|
(interactive "DDirectory to convert: \nDTarget Directory:")
|
|
|
|
|
(let ((dirs-full
|
|
|
|
|
(remove-if-not #'file-directory-p
|
|
|
|
|
(directory-files
|
|
|
|
|
source-dir t
|
|
|
|
|
directory-files-no-dot-files-regexp))))
|
|
|
|
|
|
|
|
|
|
(mapc (lambda (dir)
|
|
|
|
|
(my-dir-to-org dir
|
|
|
|
|
(concat target-dir
|
|
|
|
|
(file-name-base dir) ".org")))
|
|
|
|
|
dirs-full)))
|
|
|
|
|
|
|
|
|
|
(defun my-org-tree-to-indirect-buffer (&optional arg)
|
|
|
|
|
"Create indirect buffer and narrow it to current subtree.
|
|
|
|
|
The buffer is named after the subtree heading, with the filename
|
|
|
|
|
appended. If a buffer by that name already exists, it is
|
|
|
|
|
selected instead of creating a new buffer."
|
|
|
|
|
(interactive "P")
|
|
|
|
|
(let* ((new-buffer-p)
|
|
|
|
|
(pos (point))
|
|
|
|
|
w (buffer-name (let* ((heading (org-get-heading t t))
|
|
|
|
|
(level (org-outline-level))
|
|
|
|
|
(face (intern (concat "outline-" (number-to-string level))))
|
|
|
|
|
(heading-string (propertize (org-link-display-format heading)
|
|
|
|
|
'face face)))
|
|
|
|
|
(concat heading-string "::" (buffer-name))))
|
|
|
|
|
(new-buffer (or (get-buffer buffer-name)
|
|
|
|
|
(prog1 (condition-case nil
|
|
|
|
|
(make-indirect-buffer (current-buffer) buffer-name 'clone)
|
|
|
|
|
(error (make-indirect-buffer (current-buffer) buffer-name)))
|
|
|
|
|
(setq new-buffer-p t)))))
|
|
|
|
|
(switch-to-buffer new-buffer)
|
|
|
|
|
(when new-buffer-p
|
|
|
|
|
;; I don't understand why setting the point again is necessary, but it is.
|
|
|
|
|
(goto-char pos)
|
|
|
|
|
(rename-buffer buffer-name)
|
|
|
|
|
(org-narrow-to-subtree))))
|
|
|
|
|
|
|
|
|
|
(advice-add 'org-tree-to-indirect-buffer :override 'my-org-tree-to-indirect-buffer)
|
|
|
|
|
|
2024-06-06 01:26:00 +02:00
|
|
|
|
(setq org-archive-default-command #'org-archive-subtree-hierarchically)
|
|
|
|
|
|
|
|
|
|
(defun org-archive-subtree-hierarchically (&optional prefix)
|
|
|
|
|
(interactive "P")
|
|
|
|
|
(let* ((fix-archive-p (and (not prefix)
|
|
|
|
|
(not (use-region-p))))
|
|
|
|
|
(afile (car (org-archive--compute-location
|
|
|
|
|
(or (org-entry-get nil "ARCHIVE" 'inherit) org-archive-location))))
|
|
|
|
|
(buffer (or (find-buffer-visiting afile) (find-file-noselect afile))))
|
|
|
|
|
(org-archive-subtree prefix)
|
|
|
|
|
(when fix-archive-p
|
|
|
|
|
(with-current-buffer buffer
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(while (org-up-heading-safe))
|
|
|
|
|
(let* ((olpath (org-entry-get (point) "ARCHIVE_OLPATH"))
|
|
|
|
|
(path (and olpath (split-string olpath "/")))
|
|
|
|
|
(level 1)
|
|
|
|
|
tree-text)
|
|
|
|
|
(when olpath
|
|
|
|
|
(org-mark-subtree)
|
|
|
|
|
(setq tree-text (buffer-substring (region-beginning) (region-end)))
|
|
|
|
|
(let (this-command (inhibit-message t)) (org-cut-subtree)) ; we don’t want to see "Cut subtree" messages
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(save-restriction
|
|
|
|
|
(widen)
|
|
|
|
|
(-each path
|
|
|
|
|
(lambda (heading)
|
|
|
|
|
(if (re-search-forward
|
|
|
|
|
(rx-to-string
|
|
|
|
|
`(: bol (repeat ,level "*") (1+ " ") ,heading)) nil t)
|
|
|
|
|
(org-narrow-to-subtree)
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(unless (looking-at "^")
|
|
|
|
|
(insert "\n"))
|
|
|
|
|
(insert (make-string level ?*)
|
|
|
|
|
" "
|
|
|
|
|
heading
|
|
|
|
|
"\n"))
|
|
|
|
|
(cl-incf level)))
|
|
|
|
|
(widen)
|
|
|
|
|
(org-end-of-subtree t t)
|
|
|
|
|
(org-paste-subtree level tree-text))))))))
|
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-agenda-start-day nil)
|
|
|
|
|
(setq org-agenda-start-on-weekday nil)
|
|
|
|
|
(setq org-agenda-span 'day)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-agenda-dim-blocked-tasks t)
|
|
|
|
|
(setq org-agenda-compact-blocks t)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-agenda-skip-timestamp-if-deadline-is-shown t)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-agenda-skip-deadline-if-done t)
|
|
|
|
|
(setq org-agenda-skip-scheduled-if-done t)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-agenda-text-search-extra-files (quote (agenda-archives)))
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-agenda-search-headline-for-time nil)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-agenda-show-all-dates t)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-agenda-log-mode-items '(closed clock state))
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-agenda-sorting-strategy
|
|
|
|
|
(quote ((agenda time-up user-defined-up priority-down category-keep)
|
|
|
|
|
(todo priority-down category-keep)
|
|
|
|
|
(tags priority-down category-keep)
|
|
|
|
|
(search category-keep))))
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-agenda-use-tag-inheritance (quote (agenda)))
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-agenda-prefix-format '((agenda . " %l %i %c %s %t")
|
|
|
|
|
(todo . " %i %-12:c")
|
|
|
|
|
(tags . " %i $-12:c")
|
|
|
|
|
(search . " %i %-12:c")))
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-agenda-tags-column -80
|
|
|
|
|
org-agenda-block-separator ?─
|
|
|
|
|
org-agenda-current-time-string "◀── now ─────────────────────────────────────────────────")
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq org-agenda-time-grid
|
|
|
|
|
'((daily today remove-match)
|
|
|
|
|
(800 1000 1200 1400 1600 1800 2000)
|
|
|
|
|
" ┄┄┄┄┄ "
|
|
|
|
|
"┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄"))
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(add-hook 'org-agenda-mode-hook '(lambda () (hl-line-mode 1)))
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(add-to-list 'org-modules 'habit)
|
|
|
|
|
(setq org-habit-following-days 2
|
|
|
|
|
org-habit-preceding-days 7
|
|
|
|
|
org-habit-show-all-today nil
|
|
|
|
|
org-habit-show-habits-only-for-today t
|
|
|
|
|
org-habit-show-habits t)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(define-key org-mode-map (kbd "C-c h") 'org-habit-stats-view-habit-at-point)
|
|
|
|
|
(add-hook 'org-after-todo-state-change-hook 'org-habit-stats-update-properties)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
|
|
|
|
|
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
|
|
|
|
|
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
|
|
|
|
|
(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(require 'org-auto-tangle)
|
|
|
|
|
(add-hook 'org-mode-hook 'org-auto-tangle-mode)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-10-03 00:41:07 +02:00
|
|
|
|
(use-package! org-expiry)
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(after! org
|
|
|
|
|
(add-hook! 'org-insert-heading-hook
|
|
|
|
|
(if (or
|
|
|
|
|
(string-match-p "journal.org" buffer-file-name)
|
|
|
|
|
(string-match-p "money.org" buffer-file-name)
|
|
|
|
|
(string-match-p "therapy.org" buffer-file-name))
|
|
|
|
|
(progn
|
|
|
|
|
(org-time-stamp-inactive '(16))
|
2024-10-03 00:41:07 +02:00
|
|
|
|
(newline))
|
|
|
|
|
(org-expiry-insert-created))))
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images)
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-18 22:20:29 +02:00
|
|
|
|
(require 'org-crypt)
|
|
|
|
|
(require 'epa-file)
|
|
|
|
|
(epa-file-enable)
|
|
|
|
|
(org-crypt-use-before-save-magic)
|
|
|
|
|
(setq org-tags-exclude-from-inheritance (quote ("crypt")))
|
|
|
|
|
(setq org-crypt-key "phil@bajsicki.com")
|
|
|
|
|
(setenv "GPG_AGENT_INFO" nil)
|
|
|
|
|
|
2023-12-20 03:08:40 +01:00
|
|
|
|
(with-eval-after-load 'ox-latex
|
|
|
|
|
(add-to-list 'org-latex-classes
|
2024-06-06 01:26:00 +02:00
|
|
|
|
'("tufte-handout"
|
|
|
|
|
"\\documentclass[nobib]{tufte-handout}
|
|
|
|
|
\\usepackage{nicefrac}
|
|
|
|
|
\\usepackage{units}
|
|
|
|
|
[NO-DEFAULT-PACKAGES]
|
|
|
|
|
[EXTRA]"
|
|
|
|
|
("\\section{%s}" . "\\section*{%s}")
|
|
|
|
|
("\\subsection{%s}" . "\\subsection*{%s}")
|
|
|
|
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
|
|
|
|
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
|
|
|
|
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
|
|
|
|
|
'("memoir"
|
2023-12-20 03:08:40 +01:00
|
|
|
|
"\\documentclass{memoir}"
|
|
|
|
|
("\\chapter{%s}" . "\\chapter*{%s}")
|
|
|
|
|
("\\section{%s}" . "\\section*{%s}")
|
|
|
|
|
("\\subsection{%s}" . "\\subsection*{%s}")
|
|
|
|
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
|
|
|
|
|
|
2024-10-03 00:41:07 +02:00
|
|
|
|
(use-package! ox-hugo
|
|
|
|
|
:ensure t
|
|
|
|
|
:after ox)
|
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(use-package! org-transclusion
|
|
|
|
|
:after org
|
|
|
|
|
:init
|
|
|
|
|
(map!
|
|
|
|
|
:map global-map "<f12>" #'org-transclusion-add
|
|
|
|
|
:leader
|
|
|
|
|
:prefix "n"
|
|
|
|
|
:desc "Org Transclusion Mode" "t" #'org-transclusion-mode))
|
2023-09-21 02:46:05 +02:00
|
|
|
|
|
2024-06-06 01:26:00 +02:00
|
|
|
|
(org-wild-notifier-mode)
|
|
|
|
|
(setq alert-default-style 'libnotify
|
|
|
|
|
org-wild-notifier-alert-time '(0 5 15 60)
|
|
|
|
|
org-wild-notifier-keyword-whitelist nil
|
|
|
|
|
;; good for testing
|
|
|
|
|
org-wild-notifier--alert-severity 'high
|
2024-09-19 11:26:26 +02:00
|
|
|
|
alert-fade-time 50)
|
2023-04-15 17:25:11 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e/")
|
2023-09-21 02:46:05 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq mu4e-change-filenames-when-moving t)
|
|
|
|
|
(setq mu4e-update-interval (* 10 60))
|
|
|
|
|
(setq mu4e-get-mail-command "mbsync -a")
|
|
|
|
|
(setq mu4e-maildir "~/enc/.mail")
|
2023-09-21 02:46:05 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq mu4e-drafts-folder "/Drafts")
|
|
|
|
|
(setq mu4e-sent-folder "/Sent")
|
|
|
|
|
(setq mu4e-refile-folder "/Refile")
|
|
|
|
|
(setq mu4e-trash-folder "/Trash")
|
2023-09-21 02:46:05 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(mu4e t)
|
2023-08-22 13:06:03 +02:00
|
|
|
|
|
2024-10-03 00:41:07 +02:00
|
|
|
|
(setq my-credentials-file "~/enc/keys/emacs/circe.el")
|
|
|
|
|
|
|
|
|
|
(defun my-nickserv-password (server)
|
|
|
|
|
(with-temp-buffer
|
|
|
|
|
(insert-file-contents-literally my-credentials-file)
|
|
|
|
|
(plist-get (read (buffer-string)) :nickserv-password)))
|
|
|
|
|
|
|
|
|
|
(setq circe-network-options
|
|
|
|
|
'(("Libera Chat"
|
|
|
|
|
:nick "phil_bb"
|
|
|
|
|
:channels ("#emacs" "#emacs-circe")
|
|
|
|
|
:nickserv-password my-nickserv-password)))
|
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(use-package! pdf-tools
|
|
|
|
|
:defer t
|
|
|
|
|
:commands (pdf-loader-install)
|
|
|
|
|
:mode "\\.pdf\\'"
|
|
|
|
|
:bind (:map pdf-view-mode-map
|
|
|
|
|
("n" . pdf-view-next-line-or-next-page)
|
|
|
|
|
("p" . pdf-view-previous-line-or-previous-page)
|
|
|
|
|
("C-=" . pdf-view-enlarge)
|
|
|
|
|
("C--" . pdf-view-shrink))
|
|
|
|
|
:init (pdf-loader-install)
|
|
|
|
|
:config (add-to-list 'revert-without-query ".pdf"))
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(add-hook 'pdf-view-mode-hook #'(lambda () (interactive (display-line-numbers-mode))))
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2023-08-12 16:45:26 +02:00
|
|
|
|
(setq doom-snippets-enable-short-helpers t)
|
2023-08-22 13:06:03 +02:00
|
|
|
|
|
2023-09-21 02:46:05 +02:00
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.[Cc][Ss][Vv]\\'" . csv-mode))
|
|
|
|
|
(autoload 'csv-mode "csv-mode"
|
|
|
|
|
"Major mode for editing comma-separated value files." t)
|
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
;; (load (expand-file-name "~/.roswell/helper.el"))
|
2023-09-21 02:46:05 +02:00
|
|
|
|
|
2024-09-19 11:26:26 +02:00
|
|
|
|
(setq inferior-lisp-program "sbcl --dynamic-space-size 8192 -Q -l ~/.sbclrc")
|
2024-06-06 01:26:00 +02:00
|
|
|
|
|
2024-11-15 00:08:06 +01:00
|
|
|
|
(use-package! gptel)
|
|
|
|
|
(gptel-make-openai "ooba" ;Any name
|
2024-07-29 12:31:22 +02:00
|
|
|
|
:key "thisisanapikey"
|
2024-06-06 01:26:00 +02:00
|
|
|
|
:stream t ;Stream responses
|
|
|
|
|
:protocol "http"
|
2024-07-29 12:31:22 +02:00
|
|
|
|
:host "localhost:6666" ;Llama.cpp server location
|
2024-06-06 01:26:00 +02:00
|
|
|
|
:models '("model")) ;Any names, doesn't matter for Llama
|
|
|
|
|
|
2024-11-15 00:08:06 +01:00
|
|
|
|
(gptel-make-openai "OpenRouter"
|
|
|
|
|
:host "openrouter.ai"
|
|
|
|
|
:endpoint "/api/v1/chat/completions"
|
|
|
|
|
:key (getenv "GPTEL_OPENROUTER_API")
|
|
|
|
|
:stream t ;Stream responses
|
|
|
|
|
:models '(qwen/qwen-2.5-coder-32b-instruct))
|
|
|
|
|
|
2024-06-06 01:26:00 +02:00
|
|
|
|
(setq gptel--debug t)
|
|
|
|
|
|
2024-08-30 15:16:27 +02:00
|
|
|
|
(setq-default elfeed-search-filter "@1-week-ago +unread ")
|