Compare commits

...

29 commits

Author SHA1 Message Date
e89fbd36a5
🔧 (org-mime) Enable automatic htmlize at work
All checks were successful
Publish / publish (push) Successful in 11s
2025-02-10 18:04:47 +01:00
0c8e31e912
🔧 (org-mime) Customise 2025-02-10 18:04:39 +01:00
6d972bc5fb
(llm) Playing around with chatgpt-shell
Though, I still don't know why
2025-02-10 18:00:47 +01:00
3a3228a53f
🔧 (eww) switch default search to ecosia 2025-02-10 18:00:13 +01:00
10a1667872
💄 Disable background transparency 2025-02-10 17:56:01 +01:00
b6d142d42c
💄 Load dark theme by default
Makes more sense at least at this time of year
2025-02-10 17:55:24 +01:00
f1735b74c3
💄 (font) Switch variable-pitch font to Inter 2025-02-10 17:50:39 +01:00
40afea11e4
🔧 (fonts) Increase font size 2025-02-10 17:50:17 +01:00
f79231bdc1
🔧 Enable visual-line-mode in shells 2025-02-10 17:49:42 +01:00
268592fef7
🔧 (work) Work machine has a different name 2025-02-10 17:48:27 +01:00
f589a32f8b
Add meeting-nodes minor mode w/ bg transparency 2025-02-10 17:47:56 +01:00
ed2d0656c3
🔧 Add keybinding for hippie-expand 2025-02-10 17:45:19 +01:00
387868df6b
(forge) Add forge for magit 2025-02-10 17:44:16 +01:00
2fcf29abf6
(rainbow-mode) Add rainbow-mode 🌈 2025-02-10 17:44:04 +01:00
92e394e97a
🔧 (org) Round times to 5 minutes while clocking 2025-02-10 17:42:15 +01:00
ef99c00a9d
🔧 (org) Adjust heading font sizes 2025-02-10 17:41:57 +01:00
6957ea1cb7
(org) set org-tags-column to 0 2025-02-10 17:41:29 +01:00
f8ec81749e
(verb) Add package 2025-02-10 17:32:59 +01:00
f24672d791
(highligh-indent-guides) Disable mode 2025-02-10 17:32:30 +01:00
d48e472f9c
🔧 (eldoc) Diminish eldoc-box 2025-02-10 17:30:24 +01:00
4fd36ed2d0
(clojure) Add cider package 2025-02-10 17:29:59 +01:00
46fefddc31
🔧 (php) Disable indent-tabs-mode 2025-02-10 17:29:14 +01:00
deb33f8e87
(eshell) Enable visual-line-mode 2025-02-10 17:28:54 +01:00
792bcc134b
(eshell) Additional visual subcommands 2025-02-10 17:28:33 +01:00
8a137fe73a
(work/mu4e) Update signature file path 2025-02-10 17:28:09 +01:00
63ed6f4fff
(mu4e) Include favorites in unread mail bookmark 2025-02-10 17:27:50 +01:00
3bd68eed6f
(emms) Add play-url-at-point function 2025-02-10 17:24:48 +01:00
122529c41c
(emacs-everywhere) Add package 2025-02-10 17:24:10 +01:00
65474afcb0
(pocket) Remove package 2025-02-10 17:23:47 +01:00

View file

@ -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