1

Config: Remove obsolete configs (doom emacs, ranger)

This commit is contained in:
2025-07-15 21:30:41 +02:00
parent 19da4b9197
commit 415cdc9cef
29 changed files with 0 additions and 1719 deletions

View File

@ -1,862 +0,0 @@
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets.
(setq! user-full-name "Christoph Urlacher"
user-mail-address "tobi@urpost.de")
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
;; are the three important ones:
;;
;; + `doom-font'
;; + `doom-variable-pitch-font'
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;;
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
;; font string. You generally only need these two:
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
(setq! doom-font (font-spec :family "Victor Mono" :weight 'semi-bold :size 17) ;; Victor Mono
doom-big-font (font-spec :family "Victor Mono" :weight 'semi-bold :size 21) ;; Victor Mono
doom-variable-pitch-font (font-spec :family "Source Han Sans" :size 17) ;; Overpass, Source Han Sans CN
doom-unicode-font (font-spec :family "Source Han Sans" :size 17) ;; Use this for chinese characters 汉字
;; doom-serif-font (font-spec :family "IBM Plex Mono" :weight 'light)
)
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
;; 'doom-one-light
;; 'doom-vibrant ist noch nett
;; 'doom-one default
(setq! doom-theme 'doom-one-light)
(delq! t custom-theme-load-path) ;; we don't need defaults
(custom-set-faces!
'(doom-modeline-buffer-modified :foreground "orange")) ;; no red color in modeline
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq! org-directory "~/Notes/Org")
(setq! org-roam-directory "~/Notes/Org")
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq! display-line-numbers-type 'relative)
;; Here are some additional functions/macros that could help you configure Doom:
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package!' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;; this file. Emacs searches the `load-path' when you load packages with
;; `require' or `use-package'.
;; - `map!' for binding new keys
;;
;; To get information about any of these functions/macros, move the cursor over
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
;; This will open documentation for it, including demos of how they are used.
;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented.
;; set variables
(setq! undo-limit 80000000 ;; 80Mb
gc-cons-threshold 100000000 ;; 100Mb
;; evil-want-fine-undo t ;; may too fine as single character strokes are recognized
create-lockfiles nil
vc-follow-symlinks t
auto-save-default t ;; restore with M-x recover-file
;; mouse-wheel-scroll-amount '(1 ((shift) . 1) ((control) . nil))
;; mouse-wheel-progressive-speed nil ;; don't increase amount on faster scroll
;; pixel-scroll-precision-large-scroll-height 40.0
;; pixel-scroll-precision-interpolation-factor 30
mouse-wheel-follow-mouse t ;; scroll window where the mouse is over
doom-fallback-buffer-name "Doom"
+doom-dashboard-name "Doom"
+workspaces-on-switch-project-behavior t
confirm-kill-processes nil ;; dont ask to kill procs
bidi-paragraph-direction 'left-to-right ;; no lang direction scan for speed
bidi-inhibit-bpa t ;; speed with long nested lines
tab-width 4
indent-tabs-mode nil ;; use spaces
tab-always-indent t ;; don't toggle completion just indentation
fast-but-imprecise-scrolling t
redisplay-skip-fontification-on-input t
frame-resize-pixelwise t
frame-inhibit-implied-resize t
idle-update-delay 1.0 ;; don't update as often to speed things up
scroll-margin 10 ;; don't scroll to last line
evil-vsplit-window-right t ;; switch to new windows
evil-split-window-below t
evil-kill-on-visual-paste nil ;; don't copy overwritten selection
;; history-delete-duplicates t
)
(setq-default tab-width 4
indent-tabs-mode nil ;; use spaces
display-line-numbers-width 4
line-spacing 0.1 ;; slightly more space
tab-always-indent t
;; major-mode 'org-mode ;; When opening a nonexistent file by mistake this is bad
delete-by-moving-to-trash t
window-combination-resize t ;; take space from all windows, not current
x-stretch-cursor t
history-length 1000
use-short-answers t
confirm-nonexistent-file-or-buffer nil
select-enable-clipboard t
)
;; modes, functions
;; (delete-selection-mode -1) ;; TODO: not sure how it works with evil
(global-subword-mode 1) ;; iterate through CamelCase
(delete-selection-mode 1) ;; replace selection
(display-time-mode -1) ;; no clock
(scroll-bar-mode -1) ;; no scroll bar
(set-fringe-mode 5) ;; left hand side change marker width
;; (save-place-mode 1) ;; save buffer cursor position ;; agenda can't jump to right heading anymore
(semantic-mode 1)
(tooltip-mode -1) ;; no hover button tooltips
(global-auto-revert-mode 1) ;; refrashe buffer if changed on disk
(keychain-refresh-environment) ;; keychain ssh
;; (global-tree-sitter-mode) ;; faster syntax highlighting for all buffers that support tree-sitter
;; (pixel-scroll-precision-mode) ;; better mouse scroll
;; clean starup screen
;; (remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-shortmenu)
;; (add-hook! '+doom-dashboard-mode-hook (hide-mode-line-mode 1) (hl-line-mode -1))
;; (setq-hook! '+doom-dashboard-mode-hook evil-normal-state-cursor (list nil))
;; doom modeline (not needed for +light)
(after! doom-modeline
(setq! doom-modeline-major-mode-icon t
doom-modeline-major-mode-color-icon t
doom-modeline-checker-simple-format t
doom-modeline-bar-width 3
doom-modeline-height 35
doom-modeline-indent-info t
doom-modeline-github t
doom-modeline-minor-modes nil
doom-modeline-window-width-limit 80
doom-modeline-lsp t
doom-modeline-enable-word-count t ; only in selection
doom-modeline-buffer-file-name-style 'truncate-with-project
))
;; theme, fonts
(after! doom-theme
(setq! doom-themes-enable-bold t
doom-themes-enable-italic t
doom-themes-padded-modeline t
))
(custom-set-faces!
'(font-lock-comment-face :slant italic)
'(font-lock-keyword-face :slant italic)
)
(custom-set-faces!
'(org-document-title :height 1.2)
)
(custom-set-faces!
'(outline-1 :weight extra-bold :height 1.25)
'(outline-2 :weight bold :height 1.15)
'(outline-3 :weight bold :height 1.12)
'(outline-4 :weight semi-bold :height 1.09)
'(outline-5 :weight semi-bold :height 1.06)
'(outline-6 :weight semi-bold :height 1.03)
'(outline-8 :weight semi-bold)
'(outline-9 :weight semi-bold)
)
(add-to-list 'default-frame-alist '(inhibit-double-buffering . t))
;; remove text properties from kill ring when closing emacs
(defun unpropertize-kill-ring ()
(setq kill-ring (mapcar 'substring-no-properties kill-ring)))
(add-hook! 'kill-emacs-hook 'unpropertize-kill-ring)
;; which-key
(after! which-key
(setq! which-key-idle-delay 0.5 ;; faster key help
which-key-sort-order 'which-key-key-order)) ;; sort by keys but separate upper and lowercase
(after! evil
(setq! evil-ex-substitute-global t
evil-move-cursor-back nil ;; don't move cursor back when leaving insert mode
evil-kill-on-visual-paste nil ;; don't copy replaced text to kill ring ;; TODO: This is duplicated, where does it belong?
;; evil-backspace-join-lines nil ;; can't backspace but C-<backspace> still fucked
))
;; smartparens
(use-package! smartparens
:init (add-hook! 'smartparens-enabled-hook #'evil-smartparens-mode)
:hook (
;; Enable strict smartparens in lisps
(clojure-mode . smartparens-strict-mode)
(lisp-mode . smartparens-strict-mode)
(emacs-lisp-mode . smartparens-strict-mode)
))
;; use this to load before evil-snipe, as <s> and <S> conflict
(use-package! evil-smartparens)
(remove-hook 'doom-first-buffer-hook #'smartparens-global-mode)
;; bindings
(map! :map global-map
"M-l" nil ;; downcase word
"M-h" nil
)
(map! :after evil-org-agenda
:map evil-org-agenda-mode-map
:m "j" #'org-agenda-next-item
:m "k" #'org-agenda-previous-item
:m "h" #'org-agenda-todo
:m "l" #'org-agenda-goto
)
(map! :after company
:map company-active-map
"TAB" #'indent-for-tab-command
)
(map! :after evil
:map evil-normal-state-map
"M-j" #'drag-stuff-down
"M-k" #'drag-stuff-up
"C-<backspace>" #'subword-backward-kill
"M-m" #'evil-multiedit-match-and-next
"M-h" #'rotate-text-backward
"M-l" #'rotate-text
;; "C-<tab>" #'centaur-tabs-forward
;; "C-<iso-lefttab>" #'centaur-tabs-backward
"<tab>" #'doom/dumb-indent
"<backtab>" #'doom/dumb-dedent
"M-L" #'dumb-jump-go
"M-H" #'dumb-jump-back
;; window bindings
"C-<left>" #'evil-window-decrease-width
"C-<right>" #'evil-window-increase-width
"C-<up>" #'evil-window-decrease-height
"C-<down>" #'evil-window-increase-height
)
(map! :after evil
:map evil-insert-state-map
"M-j" #'drag-stuff-down
"M-k" #'drag-stuff-up
"M-h" #'rotate-text-backward
"M-l" #'rotate-text
)
(map! :after smartparens
:map smartparens-mode-map
"M-r" #'sp-raise-sexp
"M-d" #'sp-kill-hybrid-sexp
"M-s" #'sp-splice-sexp
"C-M-j" #'sp-backward-slurp-sexp
"M-K" #'sp-forward-slurp-sexp
"C-M-k" #'sp-backward-barf-sexp
"M-J" #'sp-forward-barf-sexp
"M-S" #'sp-split-sexp
"C-S" #'sp-join-sexp
"C-(" #'sp-wrap-round
;; "C-[" #'sp-wrap-square ;; C-[ can't be rebound
"C-{" #'sp-wrap-curly
)
;; other binding is leader o p
(map! :desc "Toggle Treemacs"
:leader
"0" #'treemacs)
(map! :desc "Insert Snippet"
"M-/" #'yas-expand)
;; rotate text
(after! rotate-text
(pushnew! rotate-text-words'("true" "false"))
)
;; cider
(setq! cider-overlays-use-font-lock t
cider-show-error-buffer nil
cider-eval-result-prefix ""
)
(setq! eros-eval-result-prefix "")
;; Always display workspaces
(after! persp-mode
(defun display-workspaces-in-minibuffer ()
(with-current-buffer " *Minibuf-0*"
(erase-buffer)
(insert (+workspace--tabline))))
(run-with-idle-timer 1 t #'display-workspaces-in-minibuffer)
(+workspace/display))
(after! minimap
(setq! minimap-always-recenter nil
minimap-update-delay 0.25
minimap-hide-fringes t
))
;; projectile
(after! projectile
(setq! projectile-track-known-projects-automatically t
projectile-indexing-method 'alien ;; alien is faster than hybrid but doesn't recognize .projectile markers
projectile-sort-order 'recentf
projectile-ignored-projects '("/home/christoph/.emacs.d/" "/tmp/" "/home/christoph/" "/home/christoph/.emacs.d/.local/straight/repos/" "/home/christoph/Videos/")
;; projectile-project-root-files #'(".projectile") ;; only recognize .projectile projects
;; projectile-project-root-functions #'(projectile-root-top-down
;; projectile-root-top-down-recurring
;; projectile-root-bottom-up
;; projectile-root-local)
))
;; marginalia
(after! marginalia
(setq marginalia-censor-variables nil)
(defadvice! +marginalia--anotate-local-file-colorful (cand)
"Just a more colourful version of ` marginalia--anotate-local-file'."
:override #'marginalia--annotate-local-file
(when-let (attrs (file-attributes (substitute-in-file-name
(marginalia--full-candidate cand))
'integer))
(marginalia--fields
((marginalia--file-owner attrs)
:width 12 :face 'marginalia-file-owner)
((marginalia--file-modes attrs))
((+marginalia-file-size-colorful (file-attribute-size attrs))
:width 7)
((+marginalia--time-colorful (file-attribute-modification-time attrs))
:width 12))))
(defun +marginalia--time-colorful (time)
(let* ((seconds (float-time (time-subtract (current-time) time)))
(color (doom-blend
(face-attribute 'marginalia-date :foreground nil t)
(face-attribute 'marginalia-documentation :foreground nil t)
(/ 1.0 (log (+ 3 (/ (+ 1 seconds) 345600.0)))))))
;; 1 - log(3 + 1/(days + 1)) % grey
(propertize (marginalia--time time) 'face (list :foreground color))))
(defun +marginalia-file-size-colorful (size)
(let* ((size-index (/ (log10 (+ 1 size)) 7.0))
(color (if (< size-index 10000000) ; 10m
(doom-blend 'orange 'green size-index)
(doom-blend 'red 'orange (- size-index 1)))))
(propertize (file-size-human-readable size) 'face (list :foreground color)))))
;; tabs
;; (after! centaur-tabs
;; (centaur-tabs-group-by-projectile-project)
;; (setq centaur-tabs-height 36
;; centaur-tabs-set-icons t
;; centaur-tabs-style "rounded"
;; centaur-tabs-modified-marker "o"
;; centaur-tabs-close-button "×"
;; centaur-tabs-set-bar 'above
;; centaur-tabs-gray-out-icons 'buffer
;; )
;; (push "Doom" centaur-tabs-excluded-prefixes)
;; )
;; (add-hook! 'org-mode-hook 'centaur-tabs-local-mode) ;; disable tabs in selected buffers
;; (add-hook! 'latex-mode-hook 'centaur-tabs-local-mode)
;; workspaces
(after! persp-mode
(setq persp-emacsclient-init-frame-behaviour-override "main"))
;; latex
(setq! +latex-viewers '(pdf-tools)
;; TeX-engine "luatex"
TeX-auto-untabify t
TeX-command-extra-options "-shell-escape" ;; for package minted
TeX-auto-save t ;; parse on save
TeX-parse-self t ;; parse on load
LaTeX-indent-level 4
TeX-source-correlate-method 'synctex
)
(add-hook! 'LaTeX-mode-hook 'turn-on-auto-fill 'LaTeX-math-mode)
;; page break character as line
(use-package! page-break-lines
:commands page-break-lines-mode
:init
(autoload 'turn-on-page-break-lines-mode "page-break-lines"))
(after! elcord
(setq elcord-use-major-mode-as-main-icon t
elcord-display-elapsed nil))
;; org ===================================================================================================================================================================================================
;; (use-package! org-pretty-table
;; :after org
;; :config (org-pretty-table-mode global-org-pretty-table-mode))
(global-org-modern-mode)
(after! org-modern
(setq
;; Edit settings
org-auto-align-tags nil
org-tags-column 0
org-fold-catch-invisible-edits 'show-and-error
org-special-ctrl-a/e t
org-insert-heading-respect-content t
;; Org styling, hide markup etc.
org-hide-emphasis-markers t
org-pretty-entities t
org-ellipsis ""
org-modern-table nil ;; has graphical glitches when collapsing headlines
;; Agenda styling
org-agenda-block-separator ?─
org-agenda-time-grid
'((daily today require-timed)
(800 1000 1200 1400 1600 1800 2000)
" ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄")
org-agenda-current-time-string
"⭠ now ─────────────────────────────────────────────────"))
(use-package! org-appear
:hook (org-mode . org-appear-mode)
:config
(setq org-appear-autoemphasis t
org-appear-autosubmarkers t
org-appear-autolinks nil)
;; for proper first-time setup, `org-appear--set-elements'
;; needs to be run after other hooks have acted.
(run-at-time nil nil #'org-appear--set-elements))
(use-package! org-super-agenda
:after org-agenda
:init
(setq! org-super-agenda-groups '((:name "Lectures"
:tag "class"
:tag "session")
(:name "Renesas"
:tag "workhours"
:tag "worktask"
:tag "meeting")
(:name "Sheets"
:category "sheet"
:tag "sheet")
(:name "Organization"
:tag "orga")
(:name "Computer"
:tag "computer")
(:name "Today"
:scheduled today
:deadline today)
(:name "Overdue"
:deadline past)
(:name "Upcoming Tasks"
:scheduled future)
(:name "Upcoming Deadlines"
:deadline future)
(:name "Projects"
:tag "project"))
org-super-agenda-header-map nil)
:commands
(org-super-agenda-mode))
(use-package! websocket
:after org-roam)
(use-package! org-roam-ui
:after org-roam ;; or :after org
;; normally we'd recommend hooking orui after org-roam, but since org-roam does not have
;; a hookable mode anymore, you're advised to pick something yourself
;; if you don't care about startup time, use
;; :hook (after-init . org-roam-ui-mode) ;; emacs-startup-hook?
:config
(setq org-roam-ui-sync-theme t
org-roam-ui-follow t
org-roam-ui-update-on-save t
org-roam-ui-open-on-start t))
(after! org
(setq! org-default-notes-file (expand-file-name "notes-personal.org" org-directory)
org-attach-id-dir "/home/christoph/Notes/Org/Attach/"
org-attach-method 'cp ;; copy to be able to sync with nextcloud, hope the duplicates don't matter as much
org-link-file-path-type 'noabbrev ;; don't abbreviate home dir and use absolute path
;; org-ellipsis " ⮟ " ;; collapsed headline character ( ▼, ⮟, ⌄ ) ;; not always displayed properly (no idea why)
org-startup-folded 'fold
org-startup-numerated nil
org-startup-indented t
org-startup-with-inline-images t
org-display-remote-inline-images 'download
org-startup-with-latex-preview nil ;; has long loading times if preview isn't cached yet, also use texfrag
org-startup-truncated t
org-list-allow-alphabetical t
org-hide-emphasis-markers nil ;; org-pretty-mode does that
org-hide-leading-stars nil ;; org-superstar does that
org-log-done 'time
org-use-property-inheritance t
org-cycle-separator-lines 2 ;; keep empty line between collapsed trees (1) org not (2)
org-confirm-babel-evaluate nil ;; shut up
org-export-babel-evaluate t
;; org-export-in-background t
org-fontify-quote-and-verse-blocks t
org-superstar-remove-leading-stars t
org-superstar-item-bullet-alist '((?* . ?•) ;; Old dash:
(?+ . ?➤)
(?- . ?•))
org-todo-keywords '((sequence "TODO(t)" "IN-PROGRESS(p)" "HALT(h)" "WAITING(w)" "OPTIONAL(o)" "|" "DONE(d)" "CANCELED(c)"))
org-todo-keyword-faces '(("TODO" . org-todo)
("IN-PROGRESS" . (:foreground "green" :weight bold))
("HALT" . (:foreground "orange" :weight bold))
("WAITING" . (:foreground "yellow" :weight bold))
("DONE" . org-done)
("CANCELED" . org-warning)
)
org-tag-alist '((:startgrouptag)
("@work" . ?w) ;; the letter is for quick selection
(:grouptags)
("workhours")
("meeting" . ?m)
("worktask" . ?t)
(:endgrouptag)
(:startgrouptag)
("@uni" . ?u)
(:grouptags)
("class" . ?l)
("session" . ?e)
("sheet" . ?s)
("reflect" . ?r)
("orga" . ?o)
(:endgrouptag)
(:startgrouptag)
("@home" . ?h)
(:grouptags)
("guitar")
("appointment" . ?a)
("project" . ?p)
("computer" . ?c)
(:endgrouptag)
;; ungrouped tags
)
org-capture-templates '(("t" "Personal Todo" entry (file+headline "~/Notes/Org/todo_private.org" "Allgemeine Tasks")
"* TODO %^{Title} :@home:%^g\n%?" :empty-lines 1)
("s" "Personal Scheduled Todo" entry (file+headline "~/Notes/Org/todo_private.org" "Allgemeine Tasks")
"* TODO %^{Title} :@home:%^g\nSCHEDULED: %^{Scheduled to Begin}t\n%?" :empty-lines 1)
("d" "Personal Scheduled Todo with Deadline" entry (file+headline "~/Notes/Org/todo_private.org" "Allgemeine Tasks")
"* TODO %^{Title} :@home:%^g\nSCHEDULED: %^{Scheduled to Begin}t DEADLINE: %^{Deadline}T\n%?" :empty-lines 1)
("a" "Personal Appointment" entry (file+headline "~/Notes/Org/todo_private.org" "Termine")
"* %^{Title} :@home:appointment:\nSCHEDULED: %^{Appointment Date/Time}T\n%?" :empty-lines 1)
("p" "Project" entry (file+headline "~/Notes/Org/Projects/coding_projects.org" "Projects")
"* TODO %^{Title} :@home:project:\n%?" :empty-lines 1)
("T" "Uni Todo" entry (file+headline "~/Notes/Org/todo_ss_2022.org" "Allgemeine Tasks")
"* TODO %^{Title} :@uni:%^g\n%?" :empty-lines 1)
("S" "Uni Sheduled Todo" entry (file+headline "~/Notes/Org/todo_ss_2022.org" "Allgemeine Tasks")
"* TODO %^{Title} :@uni:%^g\nSCHEDULED: %^{Scheduled to Begin}t\n%?" :empty-lines 1)
("D" "Uni Scheduled Todo with Deadline" entry (file+headline "~/Notes/Org/todo_ss_2022.org" "Allgemeine Tasks")
"* TODO %^{Title} :@uni:%^g\nSCHEDULED: %^{Scheduled to Begin}t DEADLINE: %^{Deadline}T\n%?" :empty-lines 1)
("A" "Uni Appointment" entry (file+headline "~/Notes/Org/todo_ss_2022.org" "Termine")
"* %^{Title} :@uni:appointment:\nSCHEDULED: %^{Appointment Date/Time}T\n%?" :empty-lines 1)
("E" "Uni Exercise" entry (file+headline "~/Notes/Org/todo_ss_2022.org" "Übungsblätter")
"* TODO %^{Title} :@uni:sheet:%^g\n%?" :empty-lines 1)
("F" "Uni Follow Up" entry (file+headline "~/Notes/Org/todo_ss_2022.org" "Nachbereiten")
"* TODO %^{Title} :@uni:reflect:%^g\nSCHEDULED: %^{Scheduled for}t\n%?" :empty-lines 1)
)
;; agenda
org-agenda-show-all-dates nil
org-agenda-block-separator 9472 ;; this: ─ Character
org-agenda-show-current-time-in-grid nil
org-agenda-use-time-grid nil
org-agenda-skip-scheduled-if-done t
org-agenda-skip-deadline-if-done t
org-agenda-skip-timestamp-if-done t
org-agenda-include-deadlines t
org-deadline-warning-days 7
org-agenda-tags-column 90
org-agenda-start-on-weekday nil ;; start today
org-agenda-start-day nil ;; start today
org-agenda-span 7
org-agenda-skip-scheduled-if-deadline-is-shown nil
org-agenda-skip-deadline-prewarning-if-scheduled t
org-agenda-prefix-format '((agenda . " %i %-20:c%?-12t% s") ;; mehr platz für category
(todo . " %i %-15:c")
(tags . " %i %-15:c")
(search . " %i %-15:c"))
org-agenda-compact-blocks nil
org-agenda-format-date (lambda (date) (concat "\n"
(make-string (window-width) 9472)
"\n"
(org-agenda-format-date-aligned date))) ;; add separators between agenda days
;; latex
org-highlight-latex-and-related '(native script entities) ;; don't highlight latex
org-latex-listings 'minted
org-latex-minted-options '(("frame" "lines")
("linenos=true"))
;; org-latex-image-default-width nil ;; to avoid resizing
org-format-latex-options (plist-put org-format-latex-options :scale 1.2) ;; bigger inline latex
org-format-latex-options (plist-put org-format-latex-options :background "Transparent")
org-preview-latex-default-process 'dvisvgm ;; Funktioniert mit Tikz
org-latex-default-class "koma-article"
;; for latex preview, not export
org-latex-packages-alist '(
("" "minted") ;; use org src block instead
("" "tikz" t) ;; use org graphviz block instead
("" "mathtools" t)
("" "beton" t)
("" "eulerpx" t)
("" "centernot" t)
("" "ellipsis" t)
;; ("" "christex" t) ;; way too slow for preview generation
)
org-latex-compiler "lualatex" ;; sets the -%latex option for latexmk
org-latex-pdf-process '("latexmk -shell-escape -f -pdf -%latex -interaction=nonstopmode -output-directory=%o %f")
;; org-latex-pdf-process '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f") ;; Old process
org-latex-tables-booktabs t
)
(add-to-list 'org-src-lang-modes '("dot" . graphviz-dot))
(add-to-list 'org-src-block-faces '("latex" (:inherit default :extend t))) ;; don't use org-block faces
)
(setq org-agenda-deadline-faces
'((1.001 . error)
(1.0 . org-warning)
(0.5 . org-upcoming-deadline)
(0.0 . org-upcoming-distant-deadline)))
;; Org-LaTeX-Export
(after! ox-latex
(add-to-list 'org-latex-classes
'("koma-article"
"\\documentclass[12pt,a4paper,ngerman,parskip=full]{scrartcl}
\\usepackage{christex}
[NO-DEFAULT-PACKAGES]
[NO-PACKAGES]
[NO-EXTRA]"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")
)))
;; TODO: Investigate how texfrag works, I want it to use lualatex and christex
;; better inline latex preview
(use-package! texfrag
:after org
:hook (org-mode . texfrag-mode)
:config
(setq! texfrag-scale 1.3
texfrag-preview-buffer-at-start t
texfrag-subdir ".textfrag"
texfrag-header-default "\\documentclass{article}
\\usepackage{amsmath,amsfonts}
\\usepackage[utf8]{inputenc}
\\usepackage[T1]{fontenc}
\\usepackage{beton}
\\usepackage{eulerpx}
\let\\openbox\\relax
\\usepackage{mathtools}
\\usepackage{ellipsis}
\\usepackage{centernot}"
))
;; texfrag again on font size change
(add-hook 'writeroom-mode-hook (lambda () (when texfrag-mode (run-with-timer 0.1 nil 'texfrag-document))))
;; texfrag org detect starred envs \begin{align*}
(add-hook 'org-mode-hook (lambda () (setq! texfrag-frag-alist
'((("\\\\(" texfrag-org-latex-p) "\\\\)" "$" "$") ;; usual inline math \( ... \)
(("\\\\\\[" texfrag-org-latex-p) "\\\\\\]" "\\\\[" "\\\\]" :display t) ;; usual display math \[ ... \]
(("\\\\begin{\\([a-z*]+\\)}" texfrag-org-latex-p) "\\\\end{\\1}" "\\\\begin{\\2}" "\\\\end{\\2}" :display t) ;; enumerated environments
;; TODO: (("\\\\begin{\\([a-z*]+\\)}" texfrag-org-latex-p) "\\\\end{\\1}" "\\\\begin{\\2}" "\\\\end{\\2}" :display t) ;; unenumerated environments
))))
;; TODO: texfrag regenerate preview at point after editing latex
;; (define-advice org-edit-src-exit (:before (&rest _) regenerate-preview-at-point)
;; (when (eq major-mode 'latex-mode)
;; (message "Regenerating LaTeX preview...")
;; (preview-at-point)))
(after! org-agenda
(org-super-agenda-mode))
(after! org-noter
(setq! org-noter-notes-search-path '("~/Notes/Org")
org-noter-always-create-frame nil
org-noter-notes-window-behavior '(start scroll)
org-noter-notes-window-location 'horizontal-split))
(after! org-roam
(setq! org-roam-index-file "index.org"))
(add-to-list 'display-buffer-alist
'("\\*org-roam\\*"
(display-buffer-in-direction)
(direction . right)
(window-width . 0.33)
(window-height . fit-window-to-buffer)))
;; (add-hook 'org-mode-hook 'org-fragtog-mode) ;; toggle inline previews (slow)
(add-hook! 'org-mode-hook #'+org-pretty-mode) ;; removed #'mixed-pitch-mode
;; (remove-hook 'text-mode-hook #'visual-line-mode)
;; (add-hook 'text-mode-hook #'auto-fill-mode)
;; (add-hook 'writeroom-mode-hook #'visual-line-mode)
;; For font-lock lag
(defun locally-defer-font-lock ()
"Set jit-lock defer and stealth, when buffer is over a certain size."
(when (> (buffer-size) 50000)
(setq-local jit-lock-defer-time 0.05
jit-lock-stealth-time 1)))
(add-hook 'org-mode-hook #'locally-defer-font-lock)
;; end org =============================================================================================================================================================================================
;; info-colors
(use-package! info-colors
:commands (info-colors-fontify-node))
(add-hook 'Info-selection-hook 'info-colors-fontify-node)
(add-hook 'Info-mode-hook #'mixed-pitch-mode)
;; calc
(setq calc-angle-mode 'rad ; radians are rad
calc-symbolic-mode t)
;; emojify
(setq emojify-emoji-set "twemoji-v2")
;; zen
(after! writeroom-mode
(setq! writeroom-fullscreen-effect 'maximized
writeroom-global-effects (remove 'writeroom-set-alpha writeroom-global-effects)
writeroom-maximize-window t))
;; disable lsp/flycheck overlays during zen mode
(add-hook! 'writeroom-mode-enable-hook (flycheck-posframe-mode -1) (lsp-ui-mode -1))
(add-hook! 'writeroom-mode-disable-hook (flycheck-posframe-mode 1) (lsp-ui-mode 1))
;; cpp
(after! cc-mode
(setq! c-default-style "stroustrup"
c-basic-offset 4)
;; (set-docsets! 'cc-mode "C" "C++" "CMake")
(add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode))
)
(setq lsp-clients-clangd-args '(
"-j=3" ;; Number of async workers (also used by background index)
"--background-index" ;; Index in background and persist on disk
"--clang-tidy"
"--completion-style=detailed"
"--header-insertion=never"
"--header-insertion-decorators=0"
))
(after! lsp-clangd (set-lsp-priority! 'clangd 2))
(after! flycheck
(setq! ;; flycheck-clang-args '("--checks='*'")
flycheck-clang-pedantic t))
;; python
(after! python
(set-popup-rule! "^\\*Python" :side 'bottom :size 0.3 :quit nil) ;; keep python repl open
(set-popup-rule! "^\\*lsp-help\\*" :side 'right :size 0.3 :quit t)
(setq! python-shell-completion-native-enable nil))
(after! lsp-python-ms
(set-lsp-priority! 'pyright 1))
;; haskell
(after! haskell-mode
(set-popup-rule! "^\\*haskell repl\\*" :ignore t :quit nil))
;; nix
(set-formatter! 'alejandra "alejandra --quiet" :modes '(nix-mode))
;; lsp
(after! lsp-mode
(setq! read-process-output-max (* 1024 1024)
lsp-auto-guess-root t
lsp-signature-auto-activate nil
lsp-enable-file-watchers nil
lsp-enable-suggest-server-download nil
lsp-lens-enable nil
lsp-enable-symbol-highlighting nil))
(after! lsp-ui
(setq lsp-ui-doc-enable nil)) ;; disable bc slow
;; company
(after! company
(setq! company-minimum-prefix-length 1
company-show-numbers t
company-idle-delay 0.3 ;; disable automatic completion
company-global-modes '(not erc-mode message-mode help-mode gud-mode))
)
;; flycheck
(after! flycheck
(setq! flycheck-global-modes '(not latex-mode LaTeX-mode org-mode)))
;; magit
(setq! magit-repository-directories '(("~/Notes/HHU" . 3)
("~/Notes/Org" . 0)
("~/Arch" . 0)
("~/NixFlake" . 0)
("~/Documents" . 1)
("~/Projects" . 2)
("~/NoSync" . 1))
magit-repolist-columns '(("Name" 25 magit-repolist-column-ident nil)
("Version" 25 magit-repolist-column-version nil)
("N/U/S" 5 magit-repolist-column-flag
((:right-align t)
(:help-echo "N: Untracked, U: Unstaged, S: Staged")))
("Br<Up" 5 magit-repolist-column-unpulled-from-upstream
((:right-align t)
(:help-echo "Upstream changes not in branch")))
("Br>Up" 5 magit-repolist-column-unpushed-to-upstream
((:right-align t)
(:help-echo "Local changes not in upstream")))
("Path" 99 magit-repolist-column-path nil)))
;; treemacs
(after! treemacs
(setq! treemacs-follow-after-init t
treemacs-project-follow-mode t
treemacs-follow-mode t
treemacs-filewatch-mode t
;; treemacs-git-mode 'extended ;; always prompts?
;; treemacs-git-integration t
treemacs-collapse-dirs 0
treemacs-silent-refresh t
treemacs-change-root-without-asking t
treemacs-sorting 'alphabetic-case-insensitive-desc
treemacs-show-hidden-files nil
treemacs-never-persist nil
treemacs-is-never-other-window nil
treemacs-displacurrent-project-exclusively t
))
(add-hook! 'treemacs-mode-hook 'treemacs-follow-mode)
(add-hook! 'treemacs-mode-hook 'treemacs-project-follow-mode)
;; (add-hook! 'treemacs-mode-hook 'treemacs-fringe-indicator-mode)

View File

@ -1,27 +0,0 @@
(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.
'(org-agenda-files
'("~/Notes/Org/20221219233822-master_uni_uberlegungen.org" "/home/christoph/Notes/Org/20220924183716-bachelorarbeit.org" "/home/christoph/Notes/Org/coding_projects.org" "/home/christoph/Notes/Org/20220324131647-ss2022.org" "/home/christoph/Notes/Org/20220406001207-renesas.org" "/home/christoph/Notes/Org/todo_private.org" "/home/christoph/Notes/Org/todo_ss_2022.org"))
'(safe-local-variable-values
'((projectile-project-root . "~/Dotfiles/doom/.config/doom"))))
(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.
'(doom-modeline-buffer-modified ((t (:foreground "orange"))))
'(font-lock-comment-face ((t (:slant italic))))
'(font-lock-keyword-face ((t (:slant italic))))
'(org-document-title ((t (:height 1.2))))
'(outline-1 ((t (:weight extra-bold :height 1.25))))
'(outline-2 ((t (:weight bold :height 1.15))))
'(outline-3 ((t (:weight bold :height 1.12))))
'(outline-4 ((t (:weight semi-bold :height 1.09))))
'(outline-5 ((t (:weight semi-bold :height 1.06))))
'(outline-6 ((t (:weight semi-bold :height 1.03))))
'(outline-8 ((t (:weight semi-bold))))
'(outline-9 ((t (:weight semi-bold))))
'(ts-fold-replacement-face ((t (:foreground nil :box nil :inherit font-lock-comment-face :weight light)))))

View File

@ -1,193 +0,0 @@
;;; init.el -*- lexical-binding: t; -*-
;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a link to Doom's Module Index where all
;; of our modules are listed, including what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;; chinese
;;japanese
;;layout ; auie,ctsrnm is the superior home row
:completion
(company +childframe) ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
;;ivy ; a search engine for love and life
(vertico +icons) ; the search engine of the future +childframe
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
(emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
;;indent-guides ; highlighted indent columns
ligatures ; ligatures and symbols to make your code pretty again
minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
nav-flash ; blink cursor line after big motions
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
;;tabs ; a tab bar for Emacs
(treemacs +lsp) ; a project drawer, like neotree but cooler
unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe
;;vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
zen ; distraction-free coding or writing
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent
:emacs
(dired +icons) ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
(ibuffer +icons) ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
;;eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
vterm ; the best terminal emulation in Emacs
:checkers
(syntax +childframe) ; tasing you for every semicolon you forget
;;(spell +flyspell) ; tasing you for misspelling mispelling
;;grammar ; tasing grammar mistake every you make
:tools
;;ansible
biblio ; Writes a PhD for you (citation needed)
(debugger +lsp) ; FIXME stepping through code, to help you add bugs
direnv
(docker +lsp)
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
gist ; interacting with github gists
lookup ; navigate your code and its documentation
(lsp +peek) ; M-x vscode
magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs
;;pass ; password manager for nerds
pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
rgb ; creating color strings
taskrunner ; taskrunner for all your projects
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp
:os
(:if IS-MAC macos) ; improve compatibility with macOS
tty ; improve the terminal Emacs experience
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
(cc +lsp +tree-sitter) ; C > C++ == 1
(clojure +lsp) ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
(data) ; config/data formats
;;(dart +flutter) ; paint ui and not much else
;;dhall
;;elixir ; erlang done right
;;elm ; care for a cup of TEA?
(emacs-lisp) ; drown in parentheses
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your soul
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect
;;(graphql +lsp) ; Give queries a REST
(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
(json +tree-sitter) ; At least it ain't XML
;;(java +lsp +tree-sitter) ; the poster child for carpal tunnel syndrome
;;(javascript +lsp +tree-sitter) ; all(hope(abandon(ye(who(enter(here))))))
;;(julia +lsp +tree-sitter) ; a better, faster MATLAB
;;(kotlin +lsp +tree-sitter) ; a better, slicker Java(Script)
(latex +latexmk +lsp +fold) ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
;;(lua +tree-sitter) ; one-based indices? one-based indices
(markdown) ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
(nix +tree-sitter) ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
(org +dragndrop +gnuplot +hugo +jupyter +noter +pandoc +present +roam2) ; organize your plain life in plain text ; disabled +pretty for org-modern
;;php ; perl's insecure younger brother
plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
(python +lsp +pyright +tree-sitter) ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;(scala +lsp +tree-sitter) ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
(sh +fish +tree-sitter) ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
;;(web +tree-sitter) ; the tubes
(yaml +lsp) ; JSON, but readable
;;zig ; C, but simpler
:email
;;(mu4e +org +gmail)
notmuch
;;(wanderlust +gmail)
:app
;;calendar
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought
:config
;;literate
(default +bindings +smartparens)) ; +smartparens

View File

@ -1,75 +0,0 @@
;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el
;; To install a package with Doom you must declare them here and run 'doom sync'
;; on the command line, then restart Emacs for the changes to take effect -- or
;; use 'M-x doom/reload'.
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;; (package! some-package)
(package! org-super-agenda) ;; org mode
(package! org-appear :recipe (:host github :repo "awth13/org-appear")) ;; make ++, --, ~~ visible on cursor enter
;; (package! valign) ;; visual alignment for org tables
(package! graphviz-dot-mode) ;; file modes
(package! systemd)
(package! keychain-environment) ;; get github ssh-keys from keychain
(package! page-break-lines) ;; display page breaks as lines
(package! evil-smartparens)
(package! info-colors) ;; help buffer colors
(package! texfrag) ;; better org inline latex preview
;; (package! org-pretty-table :recipe (:host github :repo "Fuco1/org-pretty-table"))
(package! org-modern)
(unpin! org-roam) ;; recommended by org-roam-ui
(package! websocket) ;; for org-roam-ui
(package! org-roam-ui) ;; successor of org-roam-server, roamV2
(package! elcord)
;; (package! keycast :pin "72d9add8ba16e0cae8cfcff7fc050fa75e493b4e") ;; didn't show anything
(package! pacfiles-mode)
;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
;; https://github.com/raxod502/straight.el#the-recipe-format
;(package! another-package
; :recipe (:host github :repo "username/repo"))
;; If the package you are trying to install does not contain a PACKAGENAME.el
;; file, or is located in a subdirectory of the repo, you'll need to specify
;; `:files' in the `:recipe':
;(package! this-package
; :recipe (:host github :repo "username/repo"
; :files ("some-file.el" "src/lisp/*.el")))
;; If you'd like to disable a package included with Doom, you can do so here
;; with the `:disable' property:
;(package! builtin-package :disable t)
;; You can override the recipe of a built in package without having to specify
;; all the properties for `:recipe'. These will inherit the rest of its recipe
;; from Doom or MELPA/ELPA/Emacsmirror:
;(package! builtin-package :recipe (:nonrecursive t))
;(package! builtin-package-2 :recipe (:repo "myfork/package"))
;; Specify a `:branch' to install a package from a particular branch or tag.
;; This is required for some packages whose default branch isn't 'master' (which
;; our package manager can't deal with; see raxod502/straight.el#279)
;(package! builtin-package :recipe (:branch "develop"))
;; Use `:pin' to specify a particular commit to install.
;(package! builtin-package :pin "1a2b3c4d5e")
;; Doom's packages are pinned to a specific commit and updated from release to
;; release. The `unpin!' macro allows you to unpin single packages...
;(unpin! pinned-package)
;; ...or multiple packages
;(unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t)

View File

@ -1,19 +0,0 @@
;;; Compiled snippets and support files for `latex-mode'
;;; Snippet definitions:
;;;
(yas-define-snippets 'latex-mode
'(("theorem" "\\begin{theorem}{$1}\n $0\n\\end{theorem}" "theorem" nil nil nil "/home/christoph/.config/doom/snippets/latex-mode/theorem.yasnippet" nil nil)
("sum" "\\sum\\limits${1:$(when (> (length yas-text) 0) \"_\")\n}${1:$(when (> (length yas-text) 1) \"{\")\n}${1:i=0}${1:$(when (> (length yas-text) 1) \"}\")\n}${2:$(when (> (length yas-text) 0) \"^\")\n}${2:$(when (> (length yas-text) 1) \"{\")\n}${2:n}${2:$(when (> (length yas-text) 1) \"}\")} $0" "sum" nil nil nil "/home/christoph/.config/doom/snippets/latex-mode/sum.yasnippet" nil nil)
("subfile" "\\documentclass[main.tex]{subfiles}\n\n\\begin{document}\n\n\\section{$1}\n\n$0\n\n\\end{document}" "subfile" nil nil nil "/home/christoph/.config/doom/snippets/latex-mode/subfile.yasnippet" nil nil)
("remark" "\\begin{remark}{$1}\n $0\n\\end{remark}" "remark" nil nil nil "/home/christoph/.config/doom/snippets/latex-mode/remark.yasnippet" nil nil)
("proof" "\\begin{proof}{$1}\n $0\n\\end{proof}\n" "proof" nil nil nil "/home/christoph/.config/doom/snippets/latex-mode/proof.yasnippet" nil nil)
("mainfile" "\\input{../pre.tex}\n\n\\begin{document}\n\n\\title{$1} \\subtitle{$2} \\author{Christoph Urlacher} \\date{\\today}\n\n\\maketitle\n\\newpage\n\\tableofcontents\n\\newpage\n\n$0\n\n\\end{document}" "main file" nil nil nil "/home/christoph/.config/doom/snippets/latex-mode/main_file.yasnippet" nil nil)
("lemma" "\\begin{lemma}{$1}\n $0\n\\end{lemma}\n" "lemma" nil nil nil "/home/christoph/.config/doom/snippets/latex-mode/lemma.yasnippet" nil nil)
("int" "\\int\\limits${1:$(when (> (length yas-text) 0) \"_\")\n}${1:$(when (> (length yas-text) 1) \"{\")\n}${1:left}${1:$(when (> (length yas-text) 1) \"}\")\n}${2:$(when (> (length yas-text) 0) \"^\")\n}${2:$(when (> (length yas-text) 1) \"{\")\n}${2:right}${2:$(when (> (length yas-text) 1) \"}\")} $0\n" "int" nil nil nil "/home/christoph/.config/doom/snippets/latex-mode/int.yasnippet" nil nil)
("im" "\\\\( $1 \\\\)$0" "inline math" nil nil nil "/home/christoph/.config/doom/snippets/latex-mode/inline_math.yasnippet" nil nil)
("dm" "\\\\[ $1 \\\\]$0" "display math" nil nil nil "/home/christoph/.config/doom/snippets/latex-mode/display_math.yasnippet" nil nil)
("definition" "\\begin{definition}{$1}\n $0\n\\end{definition}" "definition" nil nil nil "/home/christoph/.config/doom/snippets/latex-mode/definition.yasnippet" nil nil)
("corollary" "\\begin{corollary}{$1}\n $0\n\\end{corollary}\n" "corollary" nil nil nil "/home/christoph/.config/doom/snippets/latex-mode/corollary.yasnippet" nil nil)))
;;; Do not edit! File generated at Wed Apr 13 20:49:27 2022

View File

@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: corollary
# key: corollary
# --
\begin{corollary}{$1}
$0
\end{corollary}

View File

@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: definition
# key: definition
# --
\begin{definition}{$1}
$0
\end{definition}

View File

@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: display math
# key: dm
# --
\\[ $1 \\]$0

View File

@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: inline math
# key: im
# --
\\( $1 \\)$0

View File

@ -1,10 +0,0 @@
# -*- mode: snippet -*-
# name: int
# key: int
# --
\int\limits${1:$(when (> (length yas-text) 0) "_")
}${1:$(when (> (length yas-text) 1) "{")
}${1:left}${1:$(when (> (length yas-text) 1) "}")
}${2:$(when (> (length yas-text) 0) "^")
}${2:$(when (> (length yas-text) 1) "{")
}${2:right}${2:$(when (> (length yas-text) 1) "}")} $0

View File

@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: lemma
# key: lemma
# --
\begin{lemma}{$1}
$0
\end{lemma}

View File

@ -1,18 +0,0 @@
# -*- mode: snippet -*-
# name: main file
# key: mainfile
# --
\input{../pre.tex}
\begin{document}
\title{$1} \subtitle{$2} \author{Christoph Urlacher} \date{\today}
\maketitle
\newpage
\tableofcontents
\newpage
$0
\end{document}

View File

@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: proof
# key: proof
# --
\begin{proof}{$1}
$0
\end{proof}

View File

@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: remark
# key: remark
# --
\begin{remark}{$1}
$0
\end{remark}

View File

@ -1,13 +0,0 @@
# -*- mode: snippet -*-
# name: subfile
# key: subfile
# --
\documentclass[main.tex]{subfiles}
\begin{document}
\section{$1}
$0
\end{document}

View File

@ -1,10 +0,0 @@
# -*- mode: snippet -*-
# name: sum
# key: sum
# --
\sum\limits${1:$(when (> (length yas-text) 0) "_")
}${1:$(when (> (length yas-text) 1) "{")
}${1:i=0}${1:$(when (> (length yas-text) 1) "}")
}${2:$(when (> (length yas-text) 0) "^")
}${2:$(when (> (length yas-text) 1) "{")
}${2:n}${2:$(when (> (length yas-text) 1) "}")} $0

View File

@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: theorem
# key: theorem
# --
\begin{theorem}{$1}
$0
\end{theorem}

View File

@ -1,18 +0,0 @@
;;; Compiled snippets and support files for `org-mode'
;;; Snippet definitions:
;;;
(yas-define-snippets 'org-mode
'(("cdot" "·" "multiplication sign" nil nil nil "/home/christoph/.config/doom/snippets/org-mode/multiplication_sign.yasnippet" nil nil)
("im" "\\\\( $0 \\\\)" "inline math" nil nil
((yas-after-exit-snippet-hook #'org-edit-special))
"/home/christoph/.config/doom/snippets/org-mode/inline_math.yasnippet" nil nil)
("latexp" "#+OPTIONS: tags:nil date:nil num:nil toc:nil tags:nil\n#+TAGS: $0\n" "latex export preamble" nil nil nil "/home/christoph/.config/doom/snippets/org-mode/export.yasnippet" nil nil)
("lrarr" "" "equivalent sign" nil nil nil "/home/christoph/.config/doom/snippets/org-mode/equivalent_sign.yasnippet" nil nil)
("begin" "\\\\begin{$1}\n $0\n\\\\end{$1}" "new environment" nil nil nil "/home/christoph/.config/doom/snippets/org-mode/environment.yasnippet" nil nil)
("dm" "\\\\[ $1 \\\\]$0" "display math" nil nil nil "/home/christoph/.config/doom/snippets/org-mode/display_math.yasnippet" nil nil)
("dfa" "#+BEGIN_SRC dot :file $1.png :cmdline -Kdot -Tpng\ndigraph {\n rankdir = LR;\n splines = true;\n node [shape = doublecircle]; Z1;\n node [shape = circle];\n Z0 -> Z1 [label = \"\"];\n $0\n}\n#+END_SRC\n" "graphviz deterministic finite automaton" nil nil nil "/home/christoph/.config/doom/snippets/org-mode/dfa.yasnippet" nil nil)
("delta" "Δ" "Delta" nil nil nil "/home/christoph/.config/doom/snippets/org-mode/big_delta.yasnippet" nil nil)
("srcR" "#+begin_src R :session *R* :tangle yes :exports both\n\n#+end_src\n" "R source block" nil nil nil "/home/christoph/.config/doom/snippets/org-mode/R_source_block" nil nil)))
;;; Do not edit! File generated at Wed Apr 13 20:49:27 2022

View File

@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: R source block
# key: srcR
# --
#+begin_src R :session *R* :tangle yes :exports both
#+end_src

View File

@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: Delta
# key: delta
# --
Δ

View File

@ -1,14 +0,0 @@
# -*- mode: snippet -*-
# name: graphviz deterministic finite automaton
# key: dfa
# --
#+BEGIN_SRC dot :file $1.png :cmdline -Kdot -Tpng
digraph {
rankdir = LR;
splines = true;
node [shape = doublecircle]; Z1;
node [shape = circle];
Z0 -> Z1 [label = ""];
$0
}
#+END_SRC

View File

@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: display math
# key: dm
# --
\\[ $1 \\]$0

View File

@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: new environment
# key: begin
# --
\\begin{$1}
$0
\\end{$1}

View File

@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: equivalent sign
# key: lrarr
# --

View File

@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: latex export preamble
# key: latexp
# --
#+OPTIONS: tags:nil date:nil num:nil toc:nil tags:nil
#+TAGS: $0

View File

@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: inline math
# key: im
# expand-env: ((yas-after-exit-snippet-hook #'org-edit-special))
# --
\\( $0 \\)

View File

@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: multiplication sign
# key: cdot
# --
·

View File

@ -1,12 +0,0 @@
;This is a comment
;% Denotes the tags under which the cheat is categorized
;# Denotes the cheat description, followed by the command
;With $ variable definitions can be provided, if the command outputs multiple lines, fzf can choose between them
;If no $ is provided for a variable the user can input arbitrary things
% first cheat
# print something
echo "My name is <name>!"
$ name: whoami

View File

@ -1,350 +0,0 @@
#!/usr/bin/env bash
set -o noclobber -o noglob -o nounset -o pipefail
IFS=$'\n'
## If the option `use_preview_script` is set to `true`,
## then this script will be called and its output will be displayed in ranger.
## ANSI color codes are supported.
## STDIN is disabled, so interactive scripts won't work properly
## This script is considered a configuration file and must be updated manually.
## It will be left untouched if you upgrade ranger.
## Because of some automated testing we do on the script #'s for comments need
## to be doubled up. Code that is commented out, because it's an alternative for
## example, gets only one #.
## Meanings of exit codes:
## code | meaning | action of ranger
## -----+------------+-------------------------------------------
## 0 | success | Display stdout as preview
## 1 | no preview | Display no preview at all
## 2 | plain text | Display the plain content of the file
## 3 | fix width | Don't reload when width changes
## 4 | fix height | Don't reload when height changes
## 5 | fix both | Don't ever reload
## 6 | image | Display the image `$IMAGE_CACHE_PATH` points to as an image preview
## 7 | image | Display the file directly as an image
## Script arguments
FILE_PATH="${1}" # Full path of the highlighted file
PV_WIDTH="${2}" # Width of the preview pane (number of fitting characters)
## shellcheck disable=SC2034 # PV_HEIGHT is provided for convenience and unused
PV_HEIGHT="${3}" # Height of the preview pane (number of fitting characters)
IMAGE_CACHE_PATH="${4}" # Full path that should be used to cache image preview
PV_IMAGE_ENABLED="${5}" # 'True' if image previews are enabled, 'False' otherwise.
FILE_EXTENSION="${FILE_PATH##*.}"
FILE_EXTENSION_LOWER="$(printf "%s" "${FILE_EXTENSION}" | tr '[:upper:]' '[:lower:]')"
## Settings
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
HIGHLIGHT_TABWIDTH=${HIGHLIGHT_TABWIDTH:-8}
HIGHLIGHT_STYLE=${HIGHLIGHT_STYLE:-pablo}
HIGHLIGHT_OPTIONS="--replace-tabs=${HIGHLIGHT_TABWIDTH} --style=${HIGHLIGHT_STYLE} ${HIGHLIGHT_OPTIONS:-}"
PYGMENTIZE_STYLE=${PYGMENTIZE_STYLE:-autumn}
OPENSCAD_IMGSIZE=${RNGR_OPENSCAD_IMGSIZE:-1000,1000}
OPENSCAD_COLORSCHEME=${RNGR_OPENSCAD_COLORSCHEME:-Tomorrow Night}
handle_extension() {
case "${FILE_EXTENSION_LOWER}" in
## Archive
a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
atool --list -- "${FILE_PATH}" && exit 5
bsdtar --list --file "${FILE_PATH}" && exit 5
exit 1;;
rar)
## Avoid password prompt by providing empty password
unrar lt -p- -- "${FILE_PATH}" && exit 5
exit 1;;
7z)
## Avoid password prompt by providing empty password
7z l -p -- "${FILE_PATH}" && exit 5
exit 1;;
## PDF
pdf)
## Preview as text conversion
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | \
fmt -w "${PV_WIDTH}" && exit 5
mutool draw -F txt -i -- "${FILE_PATH}" 1-10 | \
fmt -w "${PV_WIDTH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1;;
## BitTorrent
torrent)
transmission-show -- "${FILE_PATH}" && exit 5
exit 1;;
## OpenDocument
odt|ods|odp|sxw)
## Preview as text conversion
odt2txt "${FILE_PATH}" && exit 5
## Preview as markdown conversion
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
exit 1;;
## XLSX
xlsx)
## Preview as csv conversion
## Uses: https://github.com/dilshod/xlsx2csv
xlsx2csv -- "${FILE_PATH}" && exit 5
exit 1;;
## HTML
htm|html|xhtml)
## Preview as text conversion
w3m -dump "${FILE_PATH}" && exit 5
lynx -dump -- "${FILE_PATH}" && exit 5
elinks -dump "${FILE_PATH}" && exit 5
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
;;
## JSON
json)
jq --color-output . "${FILE_PATH}" && exit 5
python -m json.tool -- "${FILE_PATH}" && exit 5
;;
## Direct Stream Digital/Transfer (DSDIFF) and wavpack aren't detected
## by file(1).
dff|dsf|wv|wvc)
mediainfo "${FILE_PATH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
;; # Continue with next handler on failure
esac
}
handle_image() {
## Size of the preview if there are multiple options or it has to be
## rendered from vector graphics. If the conversion program allows
## specifying only one dimension while keeping the aspect ratio, the width
## will be used.
local DEFAULT_SIZE="1920x1080"
local mimetype="${1}"
case "${mimetype}" in
## SVG
image/svg+xml|image/svg)
convert -- "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
exit 1;;
## DjVu
# image/vnd.djvu)
# ddjvu -format=tiff -quality=90 -page=1 -size="${DEFAULT_SIZE}" \
# - "${IMAGE_CACHE_PATH}" < "${FILE_PATH}" \
# && exit 6 || exit 1;;
## Image
image/*)
local orientation
orientation="$( identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}" )"
## If orientation data is present and the image actually
## needs rotating ("1" means no rotation)...
if [[ -n "$orientation" && "$orientation" != 1 ]]; then
## ...auto-rotate the image according to the EXIF data.
convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6
fi
## `w3mimgdisplay` will be called for all images (unless overriden
## as above), but might fail for unsupported types.
exit 7;;
## Video
video/*)
# Thumbnail
ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6
exit 1;;
## PDF
application/pdf)
pdftoppm -f 1 -l 1 \
-scale-to-x "${DEFAULT_SIZE%x*}" \
-scale-to-y -1 \
-singlefile \
-jpeg -tiffcompression jpeg \
-- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \
&& exit 6 || exit 1;;
## ePub, MOBI, FB2 (using Calibre)
# application/epub+zip|application/x-mobipocket-ebook|\
# application/x-fictionbook+xml)
# # ePub (using https://github.com/marianosimone/epub-thumbnailer)
# epub-thumbnailer "${FILE_PATH}" "${IMAGE_CACHE_PATH}" \
# "${DEFAULT_SIZE%x*}" && exit 6
# ebook-meta --get-cover="${IMAGE_CACHE_PATH}" -- "${FILE_PATH}" \
# >/dev/null && exit 6
# exit 1;;
## Font
application/font*|application/*opentype)
preview_png="/tmp/$(basename "${IMAGE_CACHE_PATH%.*}").png"
if fontimage -o "${preview_png}" \
--pixelsize "120" \
--fontname \
--pixelsize "80" \
--text " ABCDEFGHIJKLMNOPQRSTUVWXYZ " \
--text " abcdefghijklmnopqrstuvwxyz " \
--text " 0123456789.:,;(*!?') ff fl fi ffi ffl " \
--text " The quick brown fox jumps over the lazy dog. " \
"${FILE_PATH}";
then
convert -- "${preview_png}" "${IMAGE_CACHE_PATH}" \
&& rm "${preview_png}" \
&& exit 6
else
exit 1
fi
;;
## Preview archives using the first image inside.
## (Very useful for comic book collections for example.)
# application/zip|application/x-rar|application/x-7z-compressed|\
# application/x-xz|application/x-bzip2|application/x-gzip|application/x-tar)
# local fn=""; local fe=""
# local zip=""; local rar=""; local tar=""; local bsd=""
# case "${mimetype}" in
# application/zip) zip=1 ;;
# application/x-rar) rar=1 ;;
# application/x-7z-compressed) ;;
# *) tar=1 ;;
# esac
# { [ "$tar" ] && fn=$(tar --list --file "${FILE_PATH}"); } || \
# { fn=$(bsdtar --list --file "${FILE_PATH}") && bsd=1 && tar=""; } || \
# { [ "$rar" ] && fn=$(unrar lb -p- -- "${FILE_PATH}"); } || \
# { [ "$zip" ] && fn=$(zipinfo -1 -- "${FILE_PATH}"); } || return
#
# fn=$(echo "$fn" | python -c "import sys; import mimetypes as m; \
# [ print(l, end='') for l in sys.stdin if \
# (m.guess_type(l[:-1])[0] or '').startswith('image/') ]" |\
# sort -V | head -n 1)
# [ "$fn" = "" ] && return
# [ "$bsd" ] && fn=$(printf '%b' "$fn")
#
# [ "$tar" ] && tar --extract --to-stdout \
# --file "${FILE_PATH}" -- "$fn" > "${IMAGE_CACHE_PATH}" && exit 6
# fe=$(echo -n "$fn" | sed 's/[][*?\]/\\\0/g')
# [ "$bsd" ] && bsdtar --extract --to-stdout \
# --file "${FILE_PATH}" -- "$fe" > "${IMAGE_CACHE_PATH}" && exit 6
# [ "$bsd" ] || [ "$tar" ] && rm -- "${IMAGE_CACHE_PATH}"
# [ "$rar" ] && unrar p -p- -inul -- "${FILE_PATH}" "$fn" > \
# "${IMAGE_CACHE_PATH}" && exit 6
# [ "$zip" ] && unzip -pP "" -- "${FILE_PATH}" "$fe" > \
# "${IMAGE_CACHE_PATH}" && exit 6
# [ "$rar" ] || [ "$zip" ] && rm -- "${IMAGE_CACHE_PATH}"
# ;;
esac
# openscad_image() {
# TMPPNG="$(mktemp -t XXXXXX.png)"
# openscad --colorscheme="${OPENSCAD_COLORSCHEME}" \
# --imgsize="${OPENSCAD_IMGSIZE/x/,}" \
# -o "${TMPPNG}" "${1}"
# mv "${TMPPNG}" "${IMAGE_CACHE_PATH}"
# }
# case "${FILE_EXTENSION_LOWER}" in
# ## 3D models
# ## OpenSCAD only supports png image output, and ${IMAGE_CACHE_PATH}
# ## is hardcoded as jpeg. So we make a tempfile.png and just
# ## move/rename it to jpg. This works because image libraries are
# ## smart enough to handle it.
# csg|scad)
# openscad_image "${FILE_PATH}" && exit 6
# ;;
# 3mf|amf|dxf|off|stl)
# openscad_image <(echo "import(\"${FILE_PATH}\");") && exit 6
# ;;
# esac
}
handle_mime() {
local mimetype="${1}"
case "${mimetype}" in
## RTF and DOC
text/rtf|*msword)
## Preview as text conversion
## note: catdoc does not always work for .doc files
## catdoc: http://www.wagner.pp.ru/~vitus/software/catdoc/
catdoc -- "${FILE_PATH}" && exit 5
exit 1;;
## DOCX, ePub, FB2 (using markdown)
## You might want to remove "|epub" and/or "|fb2" below if you have
## uncommented other methods to preview those formats
*wordprocessingml.document|*/epub+zip|*/x-fictionbook+xml)
## Preview as markdown conversion
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
exit 1;;
## XLS
*ms-excel)
## Preview as csv conversion
## xls2csv comes with catdoc:
## http://www.wagner.pp.ru/~vitus/software/catdoc/
xls2csv -- "${FILE_PATH}" && exit 5
exit 1;;
## Text
text/* | */xml)
## Syntax highlight
if [[ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then
exit 2
fi
if [[ "$( tput colors )" -ge 256 ]]; then
local pygmentize_format='terminal256'
local highlight_format='xterm256'
else
local pygmentize_format='terminal'
local highlight_format='ansi'
fi
env HIGHLIGHT_OPTIONS="${HIGHLIGHT_OPTIONS}" highlight \
--out-format="${highlight_format}" \
--force -- "${FILE_PATH}" && exit 5
env COLORTERM=8bit bat --color=always --style="plain" \
-- "${FILE_PATH}" && exit 5
pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}"\
-- "${FILE_PATH}" && exit 5
exit 2;;
## DjVu
image/vnd.djvu)
## Preview as text conversion (requires djvulibre)
djvutxt "${FILE_PATH}" | fmt -w "${PV_WIDTH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1;;
## Image
image/*)
## Preview as text conversion
# img2txt --gamma=0.6 --width="${PV_WIDTH}" -- "${FILE_PATH}" && exit 4
exiftool "${FILE_PATH}" && exit 5
exit 1;;
## Video and audio
video/* | audio/*)
mediainfo "${FILE_PATH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1;;
esac
}
handle_fallback() {
echo '----- File Type Classification -----' && file --dereference --brief -- "${FILE_PATH}" && exit 5
exit 1
}
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then
handle_image "${MIMETYPE}"
fi
handle_extension
handle_mime "${MIMETYPE}"
handle_fallback
exit 1