(setq backup-directory-alist '(("~/.emacs.d/backups")) delete-old-versions nil version-control t vc-make-backup-files nil auto-save-file-name-transforms '((".*" "~/.emacs.d/auto-save-list" t)) savehist-file "~/.emacs.d/savehist" require-final-newline t global-auto-revert-mode t global-auto-revert-non-file-buffers t auto-revert-verbose nil custom-safe-themes t mouse-autoselect-window t focus-follows-mouse t boymind-user "akko") (fset 'yes-or-no-p 'y-or-n-p) (if (string= (system-name) "illya") (set-frame-font "Monoflow 12" nil t) (set-frame-font "Monoflow Medium 20" nil t)) (set-frame-font "Mononoki Medium 12") (setq doom-theme 'doom-ayu-mirage) (display-time-mode 1) (define-key evil-normal-state-map (kbd ";") 'evil-ex) (define-key evil-normal-state-map (kbd "g a") 'paste-above) (define-key evil-normal-state-map (kbd "g p") 'paste-below) (global-set-key (kbd "C-x C-f") #'counsel-find-file) (map! :leader "." #'counsel-find-file) ; TODO fix (map! :after counsel "C-s" #'swiper) (after! evil-escape (setq evil-escape-key-sequence "jj") (setq-default evil-escape-delay 0.2)) (which-key-mode 1) (setq which-key-idle-delay 0.25) (defun doom/find-file-in-private-config () (interactive) (counsel-find-file doom-user-dir)) (setq ivy-height 10 ivy-count-format "(%d/%d) " ivy-use-virtual-buffers t ivy-re-builders-alist '((t . ivy--regex-ignore-order)) ivy-initial-inputs-alist '((org-refile . "") (org-capture-refile . "") (counsel-M-x . "") (counsel-describe-function . "") (counsel-describe-variable . "") (man . "") (woman . "")) ivy-read-action-function #'ivy-hydra-read-action) (setq yas-triggers-in-field t) (setq avy-all-windows nil avy-timeout-seconds 0.2 avy-keys '(?a ?s ?d ?f ?k ?l ?; ?g ?h ?q ?w ?e ?r ?t ?y ?i ?p ?A ?S ?D ?F ?J ?K ?L)) (define-key evil-normal-state-map (kbd "C-.") #'avy-goto-char-timer) (setq aw-keys '(?a ?s ?d ?f ?k ?l ?; ?g ?h ?q ?w ?e ?r ?t ?y ?i ?p ?A ?S ?D ?F ?J ?K ?L)) (defadvice projectile-project-root (around ignore-remote first activate) (unless (file-remote-p default-directory) ad-do-it)) (setq aw-scope 'global) (setq web-mode-script-padding 0 js-indent-level 2 js2-strict-missing-semi-warning nil web-mode-markup-indent-offset 2 web-mode-code-indent-offset 2 web-mode-css-indent-offset 2) (setq python-shell-interpreter "ipython" python-shell-interpreter-args "-i --simple-prompt") (setq python-shell-completion-native-disabled-interpreters '("ipython")) (setq org-roam-directory (file-truename "/mnt/tenma/srv/boymind")) ; this seems to be broken right now ;(use-package! org-roam ; :config ; (setq org-roam-database-connector 'sqlite3)) (condition-case nil (org-roam-db-autosync-mode) (file-error (progn (setq boymind/tenma-mounted nil) (warn "Boymind mount failed."))) (:success (setq boymind/tenma-mounted t))) (when boymind/tenma-mounted (org-babel-load-file (car (org-roam-id-find "d38fc8c3-651a-42e8-9ab7-33400f62a5b4"))) (boymind/setup "akko")) (setq org-startup-folded t) (add-hook 'term-mode-hook 'toggle-truncate-lines) (add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-mode)) (add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-tsx-mode)) (setq treemacs--width-is-locked nil) (setq lsp-enable-links nil) (require 'ox-publish) (defun blog/get-util (x) (with-temp-buffer (insert-file-contents (concat "~/Blog/util/" x)) (buffer-string))) (setq org-html-metadata-timestamp-format "%Y-%m-%d") ;; Get project settings (defun akko/blog-spec () "Return project settings for use with `org-publish-project-alist'." (let* ((html-head (blog/get-util "head.html")) (html-preamble (blog/get-util "preamble.html")) (html-postamble (blog/get-util "postamble.html"))) `( ("pages" :base-directory "~/Blog/org" :base-extension "org" :recursive t :publishing-directory "~/Blog/html" :publishing-function org-html-publish-to-html :html-doctype "html5" :html-html5-fancy t :html-viewport ((width "100%") (initial-scale "0.7") (minimum-scale "") (maximum-scale "") (user-scalable "")) :language "en" :section-numbers nil :with-toc nil :with-date t :with-title nil :with-author nil :auto-sitemap t :sitemap-sort-files anti-chronologically :sitemap-format-entry (lambda (entry style project) (cond ((not (directory-name-p entry)) (format "[[file:%s][%s]]\n" entry (org-publish-find-title entry project))) ((eq style 'tree) (capitalize (file-name-nondirectory (directory-file-name entry)))) (t entry))) :headline-levels 4 :html-head ,html-head :html-preamble ,html-preamble :html-postamble (lambda (p) (let* ((timestamp-format (plist-get p :html-metadata-timestamp-format)) (date (org-export-data (org-export-get-date p timestamp-format) p)) (file (plist-get p :input-file)) (modified (format-time-string timestamp-format (and file (file-attribute-modification-time (file-attributes file)))))) (concat "
")))) ("static" :base-directory "~/Blog/static" :base-extension "css\\|txt\\|jpg\\|gif\\|png\\|ttf\\|js" :recursive t :publishing-directory "~/Blog/html/static" :publishing-function org-publish-attachment) ("blog" :components ("pages" "static"))))) (setq org-publish-project-alist (akko/blog-spec)) (defun akko/publish-blog () (interactive) (setq org-publish-project-alist (akko/blog-spec)) (org-publish-all)) (defun akko/force-publish-blog () (interactive) (setq org-publish-project-alist (akko/blog-spec)) (org-publish-remove-all-timestamps) (org-publish-all)) (map! :leader (:prefix-map ("a" . "akko") :desc "Publish Blog" "b" #'akko/publish-blog :desc "Force Publish Blog" "f" #'akko/force-publish-blog)) (setq org-html-htmlize-output-type 'css) (setq org-html-htmlize-font-prefix "org-") (set-file-template! "/Blog/org/posts/.+\\.org" :trigger "__blog") (defun akko/org-current-time-string () (with-temp-buffer (org-mode) (org-time-stamp '(16)) (buffer-substring (point-min) (point-max)))) (setq shell-file-name (executable-find "bash")) (setq-default vterm-shell (executable-find "fish")) (setq-default explicit-shell-file-name (executable-find "fish"))