Compare commits
29 commits
d4ec899a82
...
e89fbd36a5
Author | SHA1 | Date | |
---|---|---|---|
e89fbd36a5 | |||
0c8e31e912 | |||
6d972bc5fb | |||
3a3228a53f | |||
10a1667872 | |||
b6d142d42c | |||
f1735b74c3 | |||
40afea11e4 | |||
f79231bdc1 | |||
268592fef7 | |||
f589a32f8b | |||
ed2d0656c3 | |||
387868df6b | |||
2fcf29abf6 | |||
92e394e97a | |||
ef99c00a9d | |||
6957ea1cb7 | |||
f8ec81749e | |||
f24672d791 | |||
d48e472f9c | |||
4fd36ed2d0 | |||
46fefddc31 | |||
deb33f8e87 | |||
792bcc134b | |||
8a137fe73a | |||
63ed6f4fff | |||
3bd68eed6f | |||
122529c41c | |||
65474afcb0 |
1 changed files with 144 additions and 29 deletions
173
config.org
173
config.org
|
@ -46,14 +46,15 @@ For using the Macbook keyboard effectively with Emacs I made some adjustments ba
|
|||
|
||||
** System Detection
|
||||
|
||||
My work machine is called “knuth” and there is some configuration which I only want there.
|
||||
My work machine is called “mccarthy” and there is some configuration which I only want there.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun mmk2410/work ()
|
||||
"Return t if machine is my work machine"
|
||||
(string-equal (system-name) "knuth"))
|
||||
(string-equal (system-name) "mccarthy"))
|
||||
#+end_src
|
||||
|
||||
|
||||
** Personal Information
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -131,6 +132,7 @@ Sources:
|
|||
(setq-default global-visual-line-mode t)
|
||||
(add-hook 'org-mode-hook 'visual-line-mode)
|
||||
(add-hook 'prog-mode-hook 'visual-line-mode)
|
||||
(add-hook 'shell-mode-hook 'visual-line-mode)
|
||||
#+end_src
|
||||
|
||||
** Delete trailing white-space
|
||||
|
@ -439,16 +441,16 @@ My typeface is not loading when using emacsclient. So I set it explicitly when c
|
|||
mmk2410/fixed-font-name "Berkeley Mono"
|
||||
mmk2410/fixed-font-height 140
|
||||
mmk2410/fixed-font-present-height 160
|
||||
mmk2410/variable-font-name "Open Sans"
|
||||
mmk2410/variable-font-name "Inter"
|
||||
mmk2410/variable-font-height 160
|
||||
mmk2410/variable-font-present-height 180)
|
||||
(setq mmk2410/frame-font "Berkeley Mono 11"
|
||||
(setq mmk2410/frame-font "Berkeley Mono 12"
|
||||
mmk2410/frame-font-present "Berkeley Mono 16"
|
||||
mmk2410/fixed-font-name "Berkeley Mono"
|
||||
mmk2410/fixed-font-height 110
|
||||
mmk2410/fixed-font-height 120
|
||||
mmk2410/fixed-font-present-height 160
|
||||
mmk2410/variable-font-name "Open Sans"
|
||||
mmk2410/variable-font-height 130
|
||||
mmk2410/variable-font-name "Inter"
|
||||
mmk2410/variable-font-height 120
|
||||
mmk2410/variable-font-present-height 160))
|
||||
|
||||
(add-hook 'after-make-frame-functions
|
||||
|
@ -523,7 +525,7 @@ Installing and enabling ef-themes.
|
|||
#+begin_src emacs-lisp
|
||||
(use-package ef-themes
|
||||
:init
|
||||
(setq ef-themes-to-toggle '(ef-light ef-dark))
|
||||
(setq ef-themes-to-toggle '(ef-eagle ef-owl))
|
||||
(setq ef-themes-mixed-fonts t)
|
||||
(setq ef-themes-headings
|
||||
'((0 . (variable-pitch light 1.9))
|
||||
|
@ -536,17 +538,31 @@ Installing and enabling ef-themes.
|
|||
(7 . (variable-pitch 1.2))
|
||||
(t . (variable-pitch 1.1))))
|
||||
:config
|
||||
(load-theme 'ef-eagle t))
|
||||
(load-theme 'ef-owl t))
|
||||
#+end_src
|
||||
|
||||
|
||||
Add a slight transparency to the frames. Code provided by David Wilson / System Crafters [[https://github.com/daviwil/emacs-from-scratch/blob/master/Emacs.org][Emacs from Scratch]] video series.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq mmk2410/alpha-background 95)
|
||||
(setq mmk2410/frame-transparency 100)
|
||||
|
||||
(set-frame-parameter nil 'alpha-background mmk2410/alpha-background)
|
||||
(add-to-list 'default-frame-alist `(alpha-background . ,mmk2410/alpha-background))
|
||||
(set-frame-parameter nil 'alpha-background mmk2410/frame-transparency)
|
||||
(add-to-list 'default-frame-alist `(alpha-background . ,mmk2410/frame-transparency))
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq meeting-nodes-alpha-background 40)
|
||||
|
||||
(define-minor-mode meeting-nodes-mode
|
||||
"Take meeting notes."
|
||||
nil
|
||||
:global t
|
||||
:lighter " mn"
|
||||
|
||||
(if meeting-nodes-mode
|
||||
(set-frame-parameter nil 'alpha-background meeting-nodes-alpha-background)
|
||||
(set-frame-parameter nil 'alpha-background mmk2410/frame-transparency)))
|
||||
#+end_src
|
||||
|
||||
** Switch theme
|
||||
|
@ -657,6 +673,12 @@ List of own custom keybindings
|
|||
(global-set-key (kbd "C-x C-b") 'ibuffer)
|
||||
#+end_src
|
||||
|
||||
** Hippie Expand
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(global-set-key (kbd "C-ä") 'hippie-expand)
|
||||
#+end_src
|
||||
|
||||
** Disable =C-z=
|
||||
|
||||
=C-z= by default (as known from terminal applications) suspends the current frame. Since I use Emacs as GUI and not in terminal I do not want this behavior.
|
||||
|
@ -783,6 +805,13 @@ Source: [[https://magit.vc/][magit.vc]]
|
|||
("C-x g" . magit-status))
|
||||
#+end_src
|
||||
|
||||
** forge
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package forge
|
||||
:after magit)
|
||||
#+end_src
|
||||
|
||||
** orgit
|
||||
|
||||
Support for Org links to Magit buffers.
|
||||
|
@ -812,6 +841,20 @@ Source: [[https://github.com/janusvm/emacs-gitmoji][GitHub: janusvm/emacs-gitmoj
|
|||
:load-path "lisp/gitmoji/")
|
||||
#+end_src
|
||||
|
||||
** PRIDE 🌈
|
||||
|
||||
Rainbow flag in the Emacs modeline
|
||||
|
||||
Source: [[https://github.com/janusvm/emacs-gitmoji][GitHub: halfwhole/pride-mode]]
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package pride-mode
|
||||
:load-path "lisp/pride-mode/"
|
||||
:config
|
||||
(setq pride-bar-length 32)
|
||||
(pride-mode))
|
||||
#+end_src
|
||||
|
||||
** diff-hl
|
||||
|
||||
Emacs package for highlighting uncommitted changes
|
||||
|
@ -1140,7 +1183,13 @@ Hide emphasis markers. While this sometimes is very distracting it mostly looks
|
|||
(setq org-hide-emphasis-markers t)
|
||||
#+end_src
|
||||
|
||||
Make indented display of org files the default
|
||||
Clocking settings
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq org-clock-rounding-minutes 5)
|
||||
#+end_src
|
||||
|
||||
Enable indent mode by default
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq org-startup-indented t)
|
||||
|
@ -1159,15 +1208,15 @@ I like to have larger headlines in Org for better identifying them. The configur
|
|||
#+begin_src emacs-lisp
|
||||
(defun mmk2410/org-font-adjust-headlines ()
|
||||
"Adjust headline sizes, font family and weight"
|
||||
(dolist (face '((org-level-1 . 1.4)
|
||||
(org-level-2 . 1.3)
|
||||
(dolist (face '((org-level-1 . 1.3)
|
||||
(org-level-2 . 1.25)
|
||||
(org-level-3 . 1.2)
|
||||
(org-level-4 . 1.15)
|
||||
(org-level-5 . 1.1)
|
||||
(org-level-6 . 1.1)
|
||||
(org-level-7 . 1.1)
|
||||
(org-level-8 . 1.1)))
|
||||
(set-face-attribute (car face) nil :font "Open Sans" :weight 'bold :height (cdr face))))
|
||||
(set-face-attribute (car face) nil :font "Inter" :weight 'medium :height (cdr face))))
|
||||
|
||||
(with-eval-after-load 'org
|
||||
(unless (string-prefix-p "ef-" (format "%s" (car custom-enabled-themes)))
|
||||
|
@ -1537,6 +1586,10 @@ Fast org key bindings.
|
|||
|
||||
** Nicer display for Org buffers
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq org-tags-column 0)
|
||||
#+end_src
|
||||
|
||||
From [[https://github.com/daviwil/emacs-from-scratch/blob/master/Emacs.org#center-org-buffers][System Crafters' Emacs from Scratch Config]].
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -1687,6 +1740,18 @@ GitHub: [[https://github.com/takaxp/org-tree-slide][GitHub:takaxp/org-tree-slide
|
|||
(org-image-actual-width nil))
|
||||
#+end_src
|
||||
|
||||
** Verb (Restclient)
|
||||
|
||||
Organize and send HTTP requests from Emacs
|
||||
|
||||
Source: [[https://github.com/federicotdn/verb][GitHub: federicotdn/verb]]
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package verb
|
||||
:after org
|
||||
:config (define-key org-mode-map (kbd "C-c C-r") verb-command-map))
|
||||
#+end_src
|
||||
|
||||
* Org Research Assistant
|
||||
** Org Roam
|
||||
|
||||
|
@ -1869,6 +1934,7 @@ Source: [[https://github.com/DarthFennec/highlight-indent-guides][DarthFennec/hi
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package highlight-indent-guides
|
||||
:disabled t
|
||||
:config
|
||||
(setq highlight-indent-guides-method 'character
|
||||
highlight-indent-guides-responsive 'top)
|
||||
|
@ -1934,6 +2000,7 @@ Source: [[https://github.com/casouri/eldoc-box][GitHub:casouri/eldoc-box]]
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package eldoc-box
|
||||
:diminish 'eldoc-box-hover-at-point-mode
|
||||
:after eglot
|
||||
:hook ((eglot-managed-mode . eldoc-box-hover-at-point-mode)))
|
||||
#+end_src
|
||||
|
@ -1972,6 +2039,12 @@ I use Docker and more importantly docker-compose for development. Thanks to [[ht
|
|||
#+end_src
|
||||
|
||||
* Language-Specific Programming Packages
|
||||
** Clojure
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package cider)
|
||||
#+end_src
|
||||
|
||||
** Go
|
||||
|
||||
Emacs mode for the Go programming language
|
||||
|
@ -1992,7 +2065,9 @@ Source: [[https://github.com/emacs-php/php-mode][GitHub: emacs-php/php-mode]]
|
|||
#+begin_src emacs-lisp
|
||||
(use-package php-mode
|
||||
:mode "\\.php\\'"
|
||||
:config (setq php-mode-coding-style 'PSR2))
|
||||
:config
|
||||
(setq php-mode-coding-style 'PSR2)
|
||||
(setq indent-tabs-mode nil))
|
||||
#+end_src
|
||||
|
||||
** TypeScript
|
||||
|
@ -2110,6 +2185,17 @@ And for playing music in Emacs there is EMMS.
|
|||
(setq emms-source-file-default-directory "~/Music"))
|
||||
#+end_src
|
||||
|
||||
Play an URL at point using EMMS
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(with-eval-after-load 'emms
|
||||
(defun mmk2410/play-url-at-point ()
|
||||
"Play URL at point using EMMS"
|
||||
(interactive)
|
||||
(emms-play-url
|
||||
(shr-url-at-point nil))))
|
||||
#+end_src
|
||||
|
||||
* ERC (the Emacs IRC client)
|
||||
|
||||
** The beast itself
|
||||
|
@ -2181,8 +2267,6 @@ Source: [[https://github.com/kidd/erc-image.el][kidd/erc-image.el]]
|
|||
|
||||
Normally I use Firefox for browsing the web, but when I am working with full focus in Emacs I sometimes prefer eww. For example while reading a paper and taking notes on it. In this case I don't want to lose my focus while switching to a web browser (and potentially see some open tabs from another project).
|
||||
|
||||
In recent times I have gotten really bad search results on DuckDuckGo (either I can't search anymore or they really got worse). So I'm using Startpage at the moment.
|
||||
|
||||
More important for me while reading a paper is looking up some things on Wikipedia. So I defined -- additionally to a simple keybinding for eww itself -- a function and a keybinding for searching on the English Wikipedia.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -2202,7 +2286,7 @@ More important for me while reading a paper is looking up some things on Wikiped
|
|||
|
||||
(use-package eww
|
||||
:config
|
||||
(setq eww-search-prefix "https://startpage.com/search/?q=")
|
||||
(setq eww-search-prefix "https://www.ecosia.org/search?q=")
|
||||
:bind (("C-c w b" . 'eww)
|
||||
("C-c w d" . 'eww-browser-english-dict)
|
||||
("C-c w w" . 'eww-browse-wikipedia-en)))
|
||||
|
@ -2237,7 +2321,10 @@ Resources:
|
|||
:config
|
||||
(setq eshell-visual-subcommands
|
||||
'(("docker" "pull" "build")
|
||||
("docker-compose" "build"))))
|
||||
("docker compose" "build")
|
||||
("docker compose" "up")
|
||||
("docker compose" "down")))
|
||||
:hook (eshell-mode . visual-line-mode))
|
||||
#+end_src
|
||||
|
||||
* Elfeed
|
||||
|
@ -2326,15 +2413,16 @@ Emacs client for Mastodon.
|
|||
mastodon-active-user "mmk2410"))
|
||||
#+end_src
|
||||
|
||||
* Pocket
|
||||
* Emacs Everywhere
|
||||
|
||||
Emacs client for Pocket reading list (getpocket.com)
|
||||
|
||||
[[https://github.com/alphapapa/pocket-reader.el][GitHub: alphapapa/pocket-reader.el]]
|
||||
Edit with Emacs everywhere!
|
||||
|
||||
Source: [[https://github.com/tecosaur/emacs-everywhere][GitHub: tecosaur/emacs-everywhere]]
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package pocket-reader)
|
||||
(use-package emacs-everywhere
|
||||
:config
|
||||
(add-to-list 'emacs-everywhere-markdown-windows "Merge Requests"))
|
||||
#+end_src
|
||||
|
||||
* mu4e
|
||||
|
@ -2555,7 +2643,8 @@ I don't really like the default bookmarks that mu4e sets. Thats why I overwrite
|
|||
(setq mu4e-bookmarks
|
||||
'(( :name "Unread work messages"
|
||||
:key ?w
|
||||
:query "(flag:unread and m:/work/*) or m:/work/inbox" )
|
||||
:query "(flag:unread and m:/work/*) or m:/work/inbox"
|
||||
:favorite t)
|
||||
( :name "Unread no-reply work messages"
|
||||
:key ?n
|
||||
:query "flag:unread and m:/work-noreply/*" )
|
||||
|
@ -2639,7 +2728,7 @@ Now define the contexts.
|
|||
(string-prefix-p "/work" (mu4e-message-field msg :maildir))))
|
||||
:vars '( ( user-mail-address . "m.kapfer@emplify-software.de" )
|
||||
( user-full-name . "Marcel Kapfer" )
|
||||
( message-signature-file . "~/dotfiles/dot-work/signature/mu4e")
|
||||
( message-signature-file . "~/.dotfiles/dot-work/signature/mu4e")
|
||||
( mu4e-sent-folder . "/work/Sent Items" )
|
||||
( mu4e-drafts-folder . "/work/Drafts" )
|
||||
( mu4e-trash-folder . "/work/Trash" )
|
||||
|
@ -2694,7 +2783,15 @@ The [[https://github.com/org-mime/org-mime][org-mime]] package thankfully allows
|
|||
#+begin_src emacs-lisp
|
||||
(use-package org-mime
|
||||
:after (org mu4e)
|
||||
:config (setq org-mime-library 'mml))
|
||||
:config
|
||||
(setq org-mime-library 'mml)
|
||||
(setq org-mime-export-options '(:section-numbers nil
|
||||
:with-author nil
|
||||
:with-toc nil))
|
||||
(defun my/org-mime-htmlize ()
|
||||
(when mmk2410/work
|
||||
(org-mime-htmlize)))
|
||||
:hook (message-send . my/org-mime-htmlize))
|
||||
#+end_src
|
||||
|
||||
Mu4e displays a message in the minibuffer after refreshing. And since I run mbsync and mu index (through emacsclient) automatically every few minutes these messages can get quite distracting. Luckily mu4e provides an option to disable these index messages.
|
||||
|
@ -2782,6 +2879,24 @@ The following function from him takes care of the other way: bringing a message
|
|||
(global-set-key (kbd "C-c M-m") 'mmk2410/convert-mail-header-to-org-link)
|
||||
#+end_src
|
||||
|
||||
* LLM
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package chatgpt-shell
|
||||
:config
|
||||
(setq chatgpt-shell-models
|
||||
'(((:provider . "Ollama")
|
||||
(:label . "Ollama")
|
||||
(:version . "mistral:latest")
|
||||
(:short-version . "mistral")
|
||||
(:token-width . 3)
|
||||
(:context-window . 131072)
|
||||
(:handler . chatgpt-shell-ollama--handle-ollama-command)
|
||||
(:filter . chatgpt-shell-ollama--extract-ollama-response)
|
||||
(:payload . chatgpt-shell-ollama-make-payload)
|
||||
(:url . chatgpt-shell-ollama--make-url)))))
|
||||
#+end_src
|
||||
|
||||
* Helpers
|
||||
** Tab Bar Setup
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue