some minor updates

This commit is contained in:
Valentin Boettcher 2022-12-21 11:51:43 -05:00
parent 6c89e31e33
commit b76afa1103
No known key found for this signature in database
GPG key ID: E034E12B7AF56ACE
2 changed files with 172 additions and 128 deletions

12
config.phillips.sh Normal file
View file

@ -0,0 +1,12 @@
WIFI_DEV="wlp0s20f3"
ETH_DEV="enp0s31f6"
MAIN_NET=$WIFI_DEV
BATTERIES=(BAT0)
MAIN_FONT="Source Code Pro 8"
MAIN_MONITOR=eDP-1
SIDE_MONITORS=($(xrandr | rg -i "\sconnected" | rg -v eDP | cut -d" " -f1 | grep -v $MAIN_MONITOR))
BAR_POS="top"
LAPTOP=1
TERM_FONT_SIZE=10
DPI=169

View file

@ -433,9 +433,9 @@ A nice completion style.
#+begin_src emacs-lisp :tangle yes
(use-package orderless
:config
(setq completion-styles '(orderless partial-completion)
(setq completion-styles '(orderless basic)
completion-category-defaults nil
completion-category-overrides nil)
completion-category-overrides '((file (styles . (partial-completion)))))
(savehist-mode))
#+end_src
*** Prescient
@ -790,15 +790,6 @@ Color code matching delimiters.
(use-package hydra)
#+end_src
*** Direnv Support
:PROPERTIES:
:ID: de7c7800-9d2a-49bf-a004-159d688fd715
:END:
#+begin_src emacs-lisp :tangle yes
(use-package direnv
:config
(direnv-mode))
#+end_src
*** Writeroom
:PROPERTIES:
@ -847,16 +838,17 @@ Completion at point.
#+begin_src emacs-lisp :tangle yes
(use-package corfu
:custom
(corfu-cycle t) ;; Enable cycling for `corfu-next/previous'
(corfu-auto nil) ;; Enable auto completion
(corfu-cycle t) ;; Enable cycling for `corfu-next/previous'
(corfu-auto nil) ;; Enable auto completion
;; (corfu-commit-predicate nil) ;; Do not commit selected candidates on next input
(corfu-quit-at-boundary t) ;; Automatically quit at word boundary
(corfu-separator ?\s)
(corfu-quit-at-boundary nil) ;; Automatically quit at word boundary
(corfu-quit-no-match t) ;; Automatically quit if there is no match
;; (corfu-echo-documentation nil) ;; Do not show documentation in the echo area
;; Opt
:config
(setq tab-always-indent 'complete)
(setq completion-cycle-threshold 3)
(global-corfu-mode))
#+end_src
*** LSP
@ -1226,10 +1218,11 @@ Buff the agenda to use Groups.
Agenda Files (default and current projects):
#+BEGIN_SRC emacs-lisp :tangle yes
(setq
org-agenda-files
(list org-default-todos-file org-default-notes-file org-default-calendar-file
"~/Documents/PhD/LightEngineering/project.org"))
(setq
org-agenda-files
(list org-default-todos-file org-default-notes-file org-default-calendar-file
"~/Documents/PhD/LightEngineering/project.org"
"~/Documents/master/eflow_paper/project.org"))
#+END_SRC
**** Automatically mark task as done if all subtasks are done
@ -1259,7 +1252,6 @@ Agenda Files (default and current projects):
(sequence "HOMEWORK" "ACTIVE" "|" "FINISHED")))
#+END_SRC
**** Capture Templates
:PROPERTIES:
:ID: 534bc598-1e8f-4f63-91b9-2653d30cd173
@ -1421,7 +1413,8 @@ I have disabled evince for now.
("\\.gif\\'" . "eog \"%s\"")
("\\.mp4\\'" . "vlc \"%s\"")
("\\.mkv" . "vlc \"%s\"")
("\\.xoj" . "xournal \"%s\"")
("\\.xoj" . "xournalpp \"%s\"")
("\\.xopp" . "xournalpp \"%s\"")
("\\.svg" . "firefox \"%s\"")
("\\.webm" . "vlc \"%s\""))))
@ -1669,6 +1662,20 @@ See https://www.orgroam.com/manual.html.
(file+head "references/${citekey}.org" "#+title: ${title}\n")
:unnarrowed t)))
(setq org-roam-dailies-directory "daily/")
(setq org-roam-dailies-capture-templates
'(("d" "default" entry
"* %?"
:target (file+head "%<%Y-%m-%d>.org"
"#+title: %<%Y-%m-%d>\n"))
("m" "Group Meeting" entry
"* %? {topic}"
:target (file+head "%<%Y-%m-%d>_group_meeting.org"
"#+title: %<%Y-%m-%d>\n"))))
:bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
("C-c n i" . org-roam-node-insert)))
@ -1736,6 +1743,18 @@ For a nice mindmap in the browser.
;; :bind
;; ("C-x m" . mathpix-screenshot))
#+end_src
**** Org Pomodoro
#+begin_src emacs-lisp :tangle yes
(use-package org-pomodoro
:config
(setq org-pomodoro-manual-break t)
(setq org-pomodoro-time-format "%.2m")
(setq alert-default-style 'notifications)
(setq org-pomodoro-length 25)
(setq org-pomodoro-keep-killed-pomodoro-time t))
#+end_src
*** Git
**** Magit
:PROPERTIES:
@ -1831,7 +1850,6 @@ Enable electric braces for math mode: ~\( \)~
(setq LaTeX-electric-left-right-brace t)
(defun my-auctex-init ()
(auto-fill-mode t)
(refill-mode t)
(latex-math-mode t)
(turn-on-reftex)
(setq font-latex-fontify-script 'multi-level)
@ -2159,8 +2177,6 @@ Support for sphinx style docstrings.
:ID: db24f115-910d-4f9f-ba13-4dd9855c0b7d
:END:
#+begin_src emacs-lisp :tangle yes
(use-package ansi-color
:after jupyter)
(use-package popup)
(use-package jupyter
:straight (:host github :repo "vale981/emacs-jupyter" :branch "patch-1")
@ -2176,6 +2192,8 @@ Support for sphinx style docstrings.
(jupyter . t)))
(setq jupyter-eval-use-overlays t)
(setq jupyter-eval-short-result-display-function #'popup-tip))
(use-package ansi-color
:after jupyter)
#+end_src
*** YASnippets
@ -2313,26 +2331,26 @@ Very useful for TeX. Expand automatically.
))
(use-package aas
:hook (LaTeX-mode . aas-activate-for-major-mode)
:hook (org-mode . aas-activate-for-major-mode)
:hook (python-mode . aas-activate-for-major-mode)
:hook (jupyter-repl-mode . (lambda ()
(aas-mode 1)
(aas-activate-keymap 'greek-letters)))
:hook (rst-mode . (lambda ()
(aas-mode 1)
(aas-activate-keymap 'greek-letters)))
:hook (minibuffer-setup . (lambda ()
(aas-mode 1)
(aas-activate-keymap 'greek-letters)))
:hook (minibuffer-exit . (lambda ()
(aas-mode 0)
(aas-activate-keymap 'greek-letters)))
:hook
((LaTeX-mode . aas-activate-for-major-mode)
(org-mode . aas-activate-for-major-mode)
(python-mode . aas-activate-for-major-mode)
(inferior-python-mode . aas-activate-for-major-mode)
(jupyter-repl-mode . aas-activate-for-major-mode)
;; (minibuffer-setup . (lambda ()
;; (aas-mode 1)
;; (aas-activate-keymap 'greek-letters)))
;; (minibuffer-exit . (lambda ()
;; (aas-mode 0)))
)
:config
(apply #'aas-set-snippets 'global greek-letters)
(aas-global-mode +1)
(apply #'aas-set-snippets 'text-mode greek-letters)
(apply #'aas-set-snippets 'greek-letters greek-letters)
(apply #'aas-set-snippets 'python-mode greek-letters)
(apply #'aas-set-snippets 'fundamental-mode greek-letters)
(apply #'aas-set-snippets 'jupyter-repl-mode greek-letters)
(apply #'aas-set-snippets 'inferior-python-mode greek-letters)
(aas-set-snippets 'latex-mode
;; set condition!
:cond #'texmathp ; expand only while in math
@ -2407,79 +2425,79 @@ Very useful for TeX. Expand automatically.
";inv" "^{-1}"
)
(aas-set-snippets 'latex-mode
;; set condition!
:cond #'texmathp ; expand only while in math
"supp" "\\supp"
"On" "O(n)"
"O1" "O(1)"
"Olog" "O(\\log n)"
"Olon" "O(n \\log n)"
"dag" "^\\dag"
"conj" "^\\ast"
"/cal" (lambda () (interactive)
(yas-expand-snippet "\\mathcal{$1}$0"))
"/dot" (lambda () (interactive)
(yas-expand-snippet "\\dot{$1}$0"))
"/ev" (lambda () (interactive)
(yas-expand-snippet "\\ev{$1}$0"))
;; bind to functions!
"//" (lambda () (interactive)
(yas-expand-snippet "\\frac{$1}{$2}$0"))
"dv" (lambda () (interactive)
(yas-expand-snippet "\\dv{$1}{$2}$0"))
"Span" (lambda () (interactive)
(yas-expand-snippet "\\Span($1)$0"))
"!=" "\\neq"
"!>" "\\mapsto"
"**" "\\cdot"
"+-" "\\pm"
"-+" "\\mp"
"->" "\\to"
"..." "\\dots"
"<<" "\\ll"
"<=" "\\leq"
"<>" "\\diamond"
"=<" "\\impliedby"
"==" "&="
"=>" "\\implies"
">=" "\\geq"
">>" "\\gg"
"AA" "\\forall"
"EE" "\\exists"
"cb" "^3"
"iff" "\\iff"
"inn" "\\in"
"notin" "\\not\\in"
"sr" "^2"
"xx" "\\times"
"|->" "\\mapsto"
"|=" "\\models"
"||" "\\mid"
"~=" "\\approx"
"~~" "\\sim"
"arccos" "\\arccos"
"arccot" "\\arccot"
"arccot" "\\arccot"
"arccsc" "\\arccsc"
"arcsec" "\\arcsec"
"arcsin" "\\arcsin"
"arctan" "\\arctan"
"cos" "\\cos"
"cot" "\\cot"
"csc" "\\csc"
"exp" "\\exp"
"ln" "\\ln"
"log" "\\log"
"perp" "\\perp"
"sin" "\\sin"
"star" "\\star"
"gcd" "\\gcd"
"min" "\\min"
"max" "\\max"
";'" "\\prime"
";." "\\cdot"
";inv" "^{-1}"
))
;; set condition!
:cond #'texmathp ; expand only while in math
"supp" "\\supp"
"On" "O(n)"
"O1" "O(1)"
"Olog" "O(\\log n)"
"Olon" "O(n \\log n)"
"dag" "^\\dag"
"conj" "^\\ast"
"/cal" (lambda () (interactive)
(yas-expand-snippet "\\mathcal{$1}$0"))
"/dot" (lambda () (interactive)
(yas-expand-snippet "\\dot{$1}$0"))
"/ev" (lambda () (interactive)
(yas-expand-snippet "\\ev{$1}$0"))
;; bind to functions!
"//" (lambda () (interactive)
(yas-expand-snippet "\\frac{$1}{$2}$0"))
"dv" (lambda () (interactive)
(yas-expand-snippet "\\dv{$1}{$2}$0"))
"Span" (lambda () (interactive)
(yas-expand-snippet "\\Span($1)$0"))
"!=" "\\neq"
"!>" "\\mapsto"
"**" "\\cdot"
"+-" "\\pm"
"-+" "\\mp"
"->" "\\to"
"..." "\\dots"
"<<" "\\ll"
"<=" "\\leq"
"<>" "\\diamond"
"=<" "\\impliedby"
"==" "&="
"=>" "\\implies"
">=" "\\geq"
">>" "\\gg"
"AA" "\\forall"
"EE" "\\exists"
"cb" "^3"
"iff" "\\iff"
"inn" "\\in"
"notin" "\\not\\in"
"sr" "^2"
"xx" "\\times"
"|->" "\\mapsto"
"|=" "\\models"
"||" "\\mid"
"~=" "\\approx"
"~~" "\\sim"
"arccos" "\\arccos"
"arccot" "\\arccot"
"arccot" "\\arccot"
"arccsc" "\\arccsc"
"arcsec" "\\arcsec"
"arcsin" "\\arcsin"
"arctan" "\\arctan"
"cos" "\\cos"
"cot" "\\cot"
"csc" "\\csc"
"exp" "\\exp"
"ln" "\\ln"
"log" "\\log"
"perp" "\\perp"
"sin" "\\sin"
"star" "\\star"
"gcd" "\\gcd"
"min" "\\min"
"max" "\\max"
";'" "\\prime"
";." "\\cdot"
";inv" "^{-1}"
))
#+end_src
*** Fish
@ -2672,21 +2690,21 @@ Stolen from [[https://www.reddit.com/r/emacs/comments/cbvwlp/juliamode_syntax_hi
:END:
Hooking into aggressive indent.
#+begin_src emacs-lisp :tangle yes
(use-package julia-formatter
:straight (julia-formatter
:type git
:repo "https://codeberg.org/FelipeLema/julia-formatter.el"
:pre-build ("julia" "--project=." "-e " "\"using Pkg; Pkg.resolve();\"")
:files ("*.el" "*.toml" "*.jl"))
:hook
(julia-mode . (lambda ()
(add-hook 'before-save-hook
(lambda ()
(julia-formatter-format-region
(point-min)
(point-max)))
nil
t))))
;; (use-package julia-formatter
;; :straight (julia-formatter
;; :type git
;; :repo "https://codeberg.org/FelipeLema/julia-formatter.el"
;; :pre-build ("julia" "--project=." "-e " "\"using Pkg; Pkg.resolve();\"")
;; :files ("*.el" "*.toml" "*.jl"))
;; :hook
;; (julia-mode . (lambda ()
;; (add-hook 'before-save-hook
;; (lambda ()
;; (julia-formatter-format-region
;; (point-min)
;; (point-max)))
;; nil
;; t))))
#+end_src
*** Rust
:PROPERTIES:
@ -2971,3 +2989,17 @@ A matrix client right inside emacs.
(pycpp-sugar))
(pycpp-unsugar)))
#+end_src
* Things that have to come last
*** Direnv Support
:PROPERTIES:
:ID: de7c7800-9d2a-49bf-a004-159d688fd715
:END:
#+begin_src emacs-lisp :tangle yes
;; (use-package direnv
;; :config
;; (direnv-mode))
(use-package envrc
:config
(envrc-global-mode))
#+end_src