diff --git a/config.org b/config.org index 9e2f3ff..769753a 100644 --- a/config.org +++ b/config.org @@ -46,15 +46,14 @@ For using the Macbook keyboard effectively with Emacs I made some adjustments ba ** System Detection -My work machine is called “mccarthy” and there is some configuration which I only want there. +My work machine is called “knuth” 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) "mccarthy")) + (string-equal (system-name) "knuth")) #+end_src - ** Personal Information #+begin_src emacs-lisp @@ -132,7 +131,6 @@ 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 @@ -441,16 +439,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 "Inter" + mmk2410/variable-font-name "Open Sans" mmk2410/variable-font-height 160 mmk2410/variable-font-present-height 180) - (setq mmk2410/frame-font "Berkeley Mono 12" + (setq mmk2410/frame-font "Berkeley Mono 11" mmk2410/frame-font-present "Berkeley Mono 16" mmk2410/fixed-font-name "Berkeley Mono" - mmk2410/fixed-font-height 120 + mmk2410/fixed-font-height 110 mmk2410/fixed-font-present-height 160 - mmk2410/variable-font-name "Inter" - mmk2410/variable-font-height 120 + mmk2410/variable-font-name "Open Sans" + mmk2410/variable-font-height 130 mmk2410/variable-font-present-height 160)) (add-hook 'after-make-frame-functions @@ -525,7 +523,7 @@ Installing and enabling ef-themes. #+begin_src emacs-lisp (use-package ef-themes :init - (setq ef-themes-to-toggle '(ef-eagle ef-owl)) + (setq ef-themes-to-toggle '(ef-light ef-dark)) (setq ef-themes-mixed-fonts t) (setq ef-themes-headings '((0 . (variable-pitch light 1.9)) @@ -538,31 +536,17 @@ Installing and enabling ef-themes. (7 . (variable-pitch 1.2)) (t . (variable-pitch 1.1)))) :config - (load-theme 'ef-owl t)) + (load-theme 'ef-eagle 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/frame-transparency 100) +(setq mmk2410/alpha-background 95) -(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))) +(set-frame-parameter nil 'alpha-background mmk2410/alpha-background) +(add-to-list 'default-frame-alist `(alpha-background . ,mmk2410/alpha-background)) #+end_src ** Switch theme @@ -673,12 +657,6 @@ 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. @@ -805,13 +783,6 @@ 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. @@ -841,20 +812,6 @@ 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 @@ -1183,13 +1140,7 @@ Hide emphasis markers. While this sometimes is very distracting it mostly looks (setq org-hide-emphasis-markers t) #+end_src -Clocking settings - -#+begin_src emacs-lisp -(setq org-clock-rounding-minutes 5) -#+end_src - -Enable indent mode by default +Make indented display of org files the default #+begin_src emacs-lisp (setq org-startup-indented t) @@ -1208,15 +1159,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.3) - (org-level-2 . 1.25) + (dolist (face '((org-level-1 . 1.4) + (org-level-2 . 1.3) (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 "Inter" :weight 'medium :height (cdr face)))) + (set-face-attribute (car face) nil :font "Open Sans" :weight 'bold :height (cdr face)))) (with-eval-after-load 'org (unless (string-prefix-p "ef-" (format "%s" (car custom-enabled-themes))) @@ -1586,10 +1537,6 @@ 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 @@ -1740,18 +1687,6 @@ 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 @@ -1934,7 +1869,6 @@ 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) @@ -2000,7 +1934,6 @@ 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 @@ -2039,12 +1972,6 @@ 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 @@ -2065,9 +1992,7 @@ 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) - (setq indent-tabs-mode nil)) + :config (setq php-mode-coding-style 'PSR2)) #+end_src ** TypeScript @@ -2185,17 +2110,6 @@ 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 @@ -2267,6 +2181,8 @@ 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 @@ -2286,7 +2202,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://www.ecosia.org/search?q=") + (setq eww-search-prefix "https://startpage.com/search/?q=") :bind (("C-c w b" . 'eww) ("C-c w d" . 'eww-browser-english-dict) ("C-c w w" . 'eww-browse-wikipedia-en))) @@ -2321,10 +2237,7 @@ Resources: :config (setq eshell-visual-subcommands '(("docker" "pull" "build") - ("docker compose" "build") - ("docker compose" "up") - ("docker compose" "down"))) - :hook (eshell-mode . visual-line-mode)) + ("docker-compose" "build")))) #+end_src * Elfeed @@ -2413,16 +2326,15 @@ Emacs client for Mastodon. mastodon-active-user "mmk2410")) #+end_src -* Emacs Everywhere +* Pocket -Edit with Emacs everywhere! + Emacs client for Pocket reading list (getpocket.com) + + [[https://github.com/alphapapa/pocket-reader.el][GitHub: alphapapa/pocket-reader.el]] -Source: [[https://github.com/tecosaur/emacs-everywhere][GitHub: tecosaur/emacs-everywhere]] #+begin_src emacs-lisp -(use-package emacs-everywhere - :config - (add-to-list 'emacs-everywhere-markdown-windows "Merge Requests")) +(use-package pocket-reader) #+end_src * mu4e @@ -2643,8 +2555,7 @@ 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" - :favorite t) + :query "(flag:unread and m:/work/*) or m:/work/inbox" ) ( :name "Unread no-reply work messages" :key ?n :query "flag:unread and m:/work-noreply/*" ) @@ -2728,7 +2639,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" ) @@ -2783,15 +2694,7 @@ 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) - (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)) + :config (setq org-mime-library 'mml)) #+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. @@ -2879,24 +2782,6 @@ 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