summaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
authorSzymon Szukalski <szymon@szymonszukalski.com>2026-04-10 18:33:19 +1000
committerSzymon Szukalski <szymon@szymonszukalski.com>2026-04-10 18:33:19 +1000
commit326c7996d27f9f5a61e787064c57716811fd83a4 (patch)
tree3e65b74b3face53522bc42e3c405afb5e146ce5a /init.el
parent4b2d5710d6d4439281333a5be11fc7bcd9d3359e (diff)
raw dogging it
Diffstat (limited to 'init.el')
-rw-r--r--init.el155
1 files changed, 155 insertions, 0 deletions
diff --git a/init.el b/init.el
new file mode 100644
index 0000000..0b96d15
--- /dev/null
+++ b/init.el
@@ -0,0 +1,155 @@
+;;; init.el --- minimal single-file Org workflow -*- lexical-binding: t; -*-
+
+;;; Code:
+
+;; --------------------------------------------------
+;; Core paths
+;; --------------------------------------------------
+
+(setq org-directory (expand-file-name "~/org"))
+(setq org-default-notes-file (expand-file-name "obtf.org" org-directory))
+
+;; --------------------------------------------------
+;; Startup: agenda as modal view
+;; --------------------------------------------------
+
+(setq initial-buffer-choice
+ (lambda ()
+ (org-agenda nil "a")
+ (delete-other-windows)
+ (current-buffer)))
+
+;; --------------------------------------------------
+;; Package bootstrap
+;; --------------------------------------------------
+
+(require 'package)
+
+(setq package-archives
+ '(("gnu" . "https://elpa.gnu.org/packages/")
+ ("nongnu" . "https://elpa.nongnu.org/nongnu/")
+ ("melpa" . "https://melpa.org/packages/")))
+
+(package-initialize)
+
+(unless package-archive-contents
+ (package-refresh-contents))
+
+(dolist (pkg '(vertico marginalia orderless consult modus-themes olivetti))
+ (unless (package-installed-p pkg)
+ (package-install pkg)))
+
+(require 'use-package)
+(setq use-package-always-ensure t)
+
+;; --------------------------------------------------
+;; UI
+;; --------------------------------------------------
+
+(setq inhibit-startup-message t
+ inhibit-startup-screen t
+ ring-bell-function #'ignore)
+
+(column-number-mode 1)
+(show-paren-mode 1)
+
+(when (display-graphic-p)
+ (tool-bar-mode -1)
+ (scroll-bar-mode -1)
+ (set-face-attribute 'default nil :font "JetBrains Mono" :height 120))
+
+(use-package modus-themes
+ :config
+ (load-theme 'modus-vivendi t))
+
+(use-package olivetti
+ :hook (org-mode . olivetti-mode)
+ :config
+ (setq olivetti-body-width 100))
+
+;; --------------------------------------------------
+;; Completion
+;; --------------------------------------------------
+
+(use-package vertico
+ :init (vertico-mode 1))
+
+(use-package marginalia
+ :init (marginalia-mode 1))
+
+(use-package orderless
+ :init
+ (setq completion-styles '(orderless basic)))
+
+(use-package consult
+ :bind (("C-s" . consult-line)
+ ("C-c o" . consult-outline)))
+
+;; --------------------------------------------------
+;; Org
+;; --------------------------------------------------
+
+(use-package org
+ :ensure nil
+ :bind (("C-c c" . org-capture)
+ ("C-c a" . org-agenda)
+ ("C-c r" . org-refile))
+ :config
+ (setq org-agenda-files (list org-default-notes-file)
+ org-todo-keywords '((sequence "TODO" "CLARIFY" "|" "DONE"))
+ org-log-done 'time
+ org-log-into-drawer t)
+
+ ;; modal capture
+ (add-to-list 'display-buffer-alist
+ '("\*Org Capture\*" (display-buffer-same-window)))
+
+ (add-hook 'org-capture-mode-hook
+ (lambda () (delete-other-windows))))
+
+;; --------------------------------------------------
+;; Capture templates
+;; --------------------------------------------------
+
+(setq org-capture-templates
+ `(("i" "Inbox" entry
+ (file+headline ,org-default-notes-file "Inbox")
+ "* %?\n")
+
+ ("t" "Task" entry
+ (file+headline ,org-default-notes-file "Tasks")
+ "* TODO %?\n")
+
+ ("q" "Question" entry
+ (file+headline ,org-default-notes-file "Questions")
+ "* CLARIFY %?\n")
+
+ ("m" "Meeting" entry
+ (file+headline ,org-default-notes-file "Meetings")
+ "* %<%H:%M> %?\n<%<%Y-%m-%d %a %H:%M>>\n")
+
+ ("r" "Recurring" entry
+ (file+headline ,org-default-notes-file "Recurring")
+ "* TODO %?\nSCHEDULED: %^t\n")))
+
+(provide 'init)
+(custom-set-variables
+ ;; custom-set-variables was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ '(safe-local-variable-values
+ '((eval progn
+ (setq-local gac-automatically-add-new-files-p t
+ gac-automatically-push-p t
+ gac-debounce-interval 2 gac-default-message
+ (lambda (_filename)
+ (format-time-string
+ "Auto-commit: %Y-%m-%d %H:%M:%S")))
+ (git-auto-commit-mode 1)))))
+(custom-set-faces
+ ;; custom-set-faces was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ )