1
0
Fork 0
dotfiles/dot_doom.d/config.el.tmpl

164 lines
6.5 KiB
Cheetah

;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
(setq user-full-name "{{ .me.name }}"
user-mail-address "{{ .me.email }}"
doom-font (font-spec :family "JetBrains Mono" :size 14)
doom-variable-pitch-font (font-spec :family "Fira Sans" :size 14)
doom-theme 'tsdh-light
org-directory "~/Documents/Zettelkasten/"
display-line-numbers-type nil
delete-selection-mode nil
writeroom-width 100
ispell-dictionary "en_GB"
ispell-aspell-data-dir "/home/bascht/.nix-profile/lib/aspell"
ispell-aspell-dict-dir ispell-aspell-data-dir
ruby-insert-encoding-magic-comment nil
git-gutter-fr+-side (quote left-fringe)
helm-org-rifle-show-path t
doom-dashboard-ascii-banner-fn #'bascht/doom-dashboard-calvin
)
(defun doom-dashboard-draw-ascii-banner-fn ()
(let* ((banner
'(
" _ww _a+”D"
" y#, _r^ # _*^ y`"
" q0 0 a” W*` F ____"
" ; #^ Mw` __`. . 4-~~^^`"
" _ _P ` /'^ `www=."
" , $ +F ` q"
" K ] ^K`"
" , #_ . ___ r ],"
" _*.^ '.__dP^^~#, ,_ *,"
" ^b / _ `` _F ] ]_"
" '___ ' ~~^ ] ["
" :` ]b_ ~k_ ,` yl"
" #P `*a__ __a~ z~`"
" #L _ ^------~^` ,/"
" ~-vww*”v_ _/`"
" ^”q_ _x”"
" __#my..___p/`mma____"
" _awP”,`,^”-_”^`._ L L #"
" _#0w_^_^,^r___...._ t [],”w"
" e^ ]b_x^_~^` __, .]Wy7` x`"
" '=w__^9*$P-*MF` ^[_.="
" ^”y qw/”^_____^~9 t"
" ]_l ,'^_`..=== x'"
" ”>.ak__awwwwWW###r"
" ##WWWWWWWWWWWWWW__"
" _WWWWWWMM#WWWW_JP^~-=w_"
" .____awwmp_wNw#[w/` ^#, ~b___."
" ` ^^^~^”W___ ]Raaaamw~`^``^^~"
" ^~”~---~~~~~~`"
))
(longest-line (apply #'max (mapcar #'length banner))))
(put-text-property
(point)
(dolist (line banner (point))
(insert (+doom-dashboard--center
+doom-dashboard--width
(concat
line (make-string (max 0 (- longest-line (length line)))
32)))
"\n"))
'face 'doom-dashboard-banner)))
(map! :leader
(:prefix-map ("l" . "org-stuff")
:desc "My Agenda" "a" #'bascht/org-agenda
:desc "My Inbox" "i" #'bascht/mu4e-inbox
:desc "Cycle all agenda files" "o" #'helm-org-rifle-agenda-files
:desc "Go to current clock" "k" #'org-clock-goto
:desc "Start my daily review" "d" #'bascht/daily-review
:desc "Jump to org file" "g" #'bascht/go-to-org-file
:desc "Clock in Alfatraing" "ca" #'bascht/alfatraining-clock-in
:desc "Clock in most recent item" "cr" #'org-mru-clock-in
:desc "" "td" (lambda () (interactive) (load-theme 'doom-one nil t))
:desc "" "tl" (lambda () (interactive) (load-theme 'doom-one-light nil t))
:desc "Run table formatter" "tf" #'org-table-calc-current-TBLFM
)
(:prefix "m"
:desc "Insert Todo heading" "l" #'evilnc-comment-or-uncomment-lines
:desc "Copy and comment lines" "y" #'evilnc-copy-and-comment-lines)
:desc "" "oc" #'org-capture
(:prefix "c"
:desc "Toggle comment" "l" #'evilnc-comment-or-uncomment-lines
:desc "Copy and comment lines" "y" #'evilnc-copy-and-comment-lines)
:desc "" "oc" #'org-capture
:desc "" "rl" #'org-refile-goto-last-stored
:desc "" "jt" #'org-journal-new-entry
:desc "" "jy" #'bascht/goto-yesterdays-journal
:desc "" "glu" #'mu4e-view-go-to-url
:desc "" "drr" #'rake
:desc "" "drl" #'rake-rerun
)
; Define quick helper switches to switch between languages while
; keeping distinct personal dictionaries for both of them
(defun bascht/switch-spellcheck (lang)
(interactive)
(message lang)
(setq ispell-personal-dictionary (concat "~/.local/share/ispell/bascht_" lang ".pws"))
(ispell-change-dictionary lang) lang)
(defun bascht/switch-spellcheck-to-english ()
(interactive)
(bascht/switch-spellcheck "en_GB")
(spell-fu-mode))
(defun bascht/switch-spellcheck-to-german ()
(interactive)
(bascht/switch-spellcheck "de_DE")
(spell-fu-mode))
; Disable spell-fu-mode globally
(remove-hook 'text-mode-hook #'spell-fu-mode)
(add-to-list 'auto-mode-alist '("\\.txt$" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.journal\\'" . ledger-mode))
(add-hook 'yaml-mode-hook
(lambda ()
(auto-fill-mode -1)
(flycheck-select-checker 'yaml-yamllint)
))
(add-hook 'git-commit-mode-hook (lambda ()
(end-of-line)
(bascht/switch-spellcheck "en_GB")
(evil-insert-state)))
(add-hook 'org-capture-mode-hook (lambda ()
(bascht/switch-spellcheck "de_DE")
(evil-insert-state)))
(add-hook 'mu4e-compose-pre-hook (lambda ()
(bascht/switch-spellcheck "de_DE")
(evil-insert-state)))
(after! forge
(add-to-list 'forge-alist '({{- range .git.forges }}"{{.}}" {{ end }}forge-gitlab-repository)))
(after! magit
(magit-wip-mode)
(magit-todos-mode)
(setq magit-log-arguments '("--graph" "--decorate" "--color")
magit-delete-by-moving-to-trash nil
git-commit-summary-max-length 80))
(defun bascht/file-string (file)
"Read the contents of a file and return as a string."
(with-current-buffer (find-file-noselect file)
(buffer-string)))
(setq org-link-abbrev-alist
'({{- range .bookmarks -}}
("{{ .name }}" . "{{ .url }}")
{{ end -}}
))
(custom-set-faces
'(mu4e-header-highlight-face ((t (:background "lemon chiffon")))))
(load! "mail.el")
(load! "org.el")
(load! "forge.el")