From e016111c2654cef38f30c45272cd9051fa9c45a2 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Tue, 28 May 2024 16:58:02 +0200 Subject: [PATCH 01/12] =?UTF-8?q?=E2=9C=A8=20(macos)=20Initial=20MacOS=20s?= =?UTF-8?q?pecific=20adjustments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 51 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/config.org b/config.org index 937cbcb..cef751e 100644 --- a/config.org +++ b/config.org @@ -26,6 +26,24 @@ For Microsoft(R) Windows(R) users it is highly adviced to set the =HOME= environ Settings for Emacs in general as well as for my personal setup. +** macOS Adjustments + +First define a variable for making MacOS specific adjustments a bit easier. + +#+begin_src emacs-lisp +(setq on-macos (eq system-type 'darwin)) +#+end_src + +For using the Macbook keyboard effectively with Emacs I made some adjustments based on some suggestions found on the internet. + +#+begin_src emacs-lisp +(when on-macos + (setq mac-option-modifier 'alt) + (setq mac-right-option-modifier 'none) + (setq mac-command-modifier 'meta) + (global-set-key [kp-delete] 'delete-char)) +#+end_src + ** System Detection My work machine is called “knuth” and there is some configuration which I only want there. @@ -415,14 +433,23 @@ Setting =frame-resize-pixelwise= to non-nil (as described in [[https://github.co My typeface is not loading when using emacsclient. So I set it explicitly when creating a frame. The same fix is applied for the scroll bars. #+begin_src emacs-lisp -(setq mmk2410/frame-font "Jetbrains Mono 11" - mmk2410/frame-font-present "Jetbrains Mono 16" - mmk2410/fixed-font-name "Jetbrains Mono" - mmk2410/fixed-font-height 110 - mmk2410/fixed-font-present-height 160 - mmk2410/variable-font-name "Open Sans" - mmk2410/variable-font-height 130 - mmk2410/variable-font-present-height 160) +(if on-macos + (setq mmk2410/frame-font "Jetbrains Mono 14" + mmk2410/frame-font-present "Jetbrains Mono 16" + mmk2410/fixed-font-name "Jetbrains Mono" + mmk2410/fixed-font-height 140 + mmk2410/fixed-font-present-height 160 + mmk2410/variable-font-name "Open Sans" + mmk2410/variable-font-height 160 + mmk2410/variable-font-present-height 180) + (setq mmk2410/frame-font "Jetbrains Mono 11" + mmk2410/frame-font-present "Jetbrains Mono 16" + mmk2410/fixed-font-name "Jetbrains Mono" + mmk2410/fixed-font-height 110 + mmk2410/fixed-font-present-height 160 + mmk2410/variable-font-name "Open Sans" + mmk2410/variable-font-height 130 + mmk2410/variable-font-present-height 160)) (add-hook 'after-make-frame-functions #'(lambda (frame) @@ -2130,6 +2157,9 @@ Source: [[https://github.com/akermu/emacs-libvterm][GitHub: akermu/emacs-libvter #+begin_src emacs-lisp (use-package vterm :if (not (eq system-type 'windows-nt)) + :config + (when on-macos + (setq vterm-shell "/opt/homebrew/bin/fish")) :bind (("C-c t" . 'vterm))) #+end_src @@ -2254,7 +2284,8 @@ Not all distributions that I use have a enough up-to-date package of mu/maildir- (mu4e-load-path-usr (concat "/usr" mu4e-site-lisp-path)) (mu4e-load-path-usr-local (concat "/usr/local" mu4e-site-lisp-path)) (mu4e-load-path-nix (concat (getenv "HOME") "/.nix-profile" mu4e-site-lisp-path)) - (mu4e-load-path-debian "/usr/share/emacs/site-lisp/elpa")) + (mu4e-load-path-debian "/usr/share/emacs/site-lisp/elpa") + (mu4e-load-path-macos "/opt/homebrew/share/emacs/site-lisp/mu/mu4e/")) (cond ((file-directory-p mu4e-load-path-nix) mu4e-load-path-nix) ((file-directory-p mu4e-load-path-usr-local) @@ -2263,6 +2294,8 @@ Not all distributions that I use have a enough up-to-date package of mu/maildir- mu4e-load-path-usr) ((file-directory-p mu4e-load-path-debian) mu4e-load-path-debian) + ((file-directory-p mu4e-load-path-macos) + mu4e-load-path-macos) (t (error "mu4e not found!")))))) #+end_src From 92797ec6373af417b07e6c7ab7b3293e788a2ccb Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Tue, 28 May 2024 16:58:29 +0200 Subject: [PATCH 02/12] =?UTF-8?q?=F0=9F=94=A7=20(ui)=20Disable=20visible?= =?UTF-8?q?=20bell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.org b/config.org index cef751e..0d1641a 100644 --- a/config.org +++ b/config.org @@ -347,7 +347,7 @@ Source: [[https://stackoverflow.com/a/744681][Stack Overflow: Unable to hide wel ** Replace BEEP by visual-bell #+begin_src emacs-lisp -(setq visible-bell 1) +(setq visible-bell nil) #+end_src ** Disable cursor blinking From e7d550b3666662e601067eb878f11d9891c2af0d Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Tue, 28 May 2024 16:59:07 +0200 Subject: [PATCH 03/12] =?UTF-8?q?=E2=9C=A8=20(ui)=20Switch=20monospace=20f?= =?UTF-8?q?ont=20to=20Berkeley=20Mono?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config.org b/config.org index 0d1641a..9d61cf8 100644 --- a/config.org +++ b/config.org @@ -434,17 +434,17 @@ My typeface is not loading when using emacsclient. So I set it explicitly when c #+begin_src emacs-lisp (if on-macos - (setq mmk2410/frame-font "Jetbrains Mono 14" - mmk2410/frame-font-present "Jetbrains Mono 16" - mmk2410/fixed-font-name "Jetbrains Mono" + (setq mmk2410/frame-font "Berkeley Mono 14" + mmk2410/frame-font-present "Berkeley Mono 16" + 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-height 160 mmk2410/variable-font-present-height 180) - (setq mmk2410/frame-font "Jetbrains Mono 11" - mmk2410/frame-font-present "Jetbrains Mono 16" - mmk2410/fixed-font-name "Jetbrains Mono" + (setq mmk2410/frame-font "Berkeley Mono 11" + mmk2410/frame-font-present "Berkeley Mono 16" + mmk2410/fixed-font-name "Berkeley Mono" mmk2410/fixed-font-height 110 mmk2410/fixed-font-present-height 160 mmk2410/variable-font-name "Open Sans" From 9576da4b3ef8122a7112b00fcbfa10a734f4a810 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Tue, 28 May 2024 16:59:49 +0200 Subject: [PATCH 04/12] =?UTF-8?q?=F0=9F=92=84=20(elfeed)=20Adjust=20item?= =?UTF-8?q?=20title=20face?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config.org b/config.org index 9d61cf8..08f0502 100644 --- a/config.org +++ b/config.org @@ -476,6 +476,15 @@ Sometimes (most often a work) I share my screen during a video call to discuss s (set-face-attribute 'fixed-pitch nil :font mmk2410/fixed-font-name :height mmk2410/fixed-font-present-height :weight 'regular)) #+end_src +Additionally like to adjust some faces to my personal liking. + +#+begin_src emacs-lisp + (with-eval-after-load 'elfeed + (set-face-attribute 'message-header-subject nil + :font mmk2410/variable-font-name + :height 220)) +#+end_src + ** Set theme Installing and enabling Gruvbox light theme. /Disabled in favor of the Doom themes./ From 28f859b6e8fbbaa24a187aab52aa5070dbb73509 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Tue, 28 May 2024 17:00:33 +0200 Subject: [PATCH 05/12] =?UTF-8?q?=F0=9F=92=84=20(ui)=20Use=20"new"=20alpha?= =?UTF-8?q?-background=20property?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config.org b/config.org index 08f0502..7a38100 100644 --- a/config.org +++ b/config.org @@ -552,10 +552,10 @@ Installing and enabling ef-themes. 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 '(95 . 95)) +(setq mmk2410/alpha-background 95) -(set-frame-parameter (selected-frame) 'alpha mmk2410/frame-transparency) -(add-to-list 'default-frame-alist `(alpha . ,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 From b6a0448ef263841e9372bbb95c3c63e5dac27e57 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Tue, 28 May 2024 17:00:58 +0200 Subject: [PATCH 06/12] =?UTF-8?q?=E2=9C=A8=20Add=20spacious=20padding=20pa?= =?UTF-8?q?ckage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config.org b/config.org index 7a38100..6a41db7 100644 --- a/config.org +++ b/config.org @@ -629,6 +629,17 @@ Source: [[https://github.com/iqbalansari/emacs-emojify][iqbalansari/emacs-emojif :commands emojify-mode) #+end_src +** Spacious Padding + +Increase the padding/spacing of GNU Emacs frames and windows + +Source: [[https://git.sr.ht/~protesilaos/spacious-padding][sr.ht: ~protesilaos/spacious-padding]] + +#+begin_src emacs-lisp +(use-package spacious-padding + :config (spacious-padding-mode 1)) +#+end_src + * Keybinding List of own custom keybindings From af78e78dd1cab06344ffde522884b4dc20d7bc84 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Tue, 28 May 2024 17:01:21 +0200 Subject: [PATCH 07/12] =?UTF-8?q?=F0=9F=92=84=20Increase=20line=20spaceing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config.org b/config.org index 6a41db7..9c66ab9 100644 --- a/config.org +++ b/config.org @@ -640,6 +640,14 @@ Source: [[https://git.sr.ht/~protesilaos/spacious-padding][sr.ht: ~protesilaos/s :config (spacious-padding-mode 1)) #+end_src +** Line Spacing + +I found out that a bit more line spacing makes Emacs look more nicely and increases the readability a bit. At least for me 🙂 + +#+begin_src emacs-lisp +(setq-default line-spacing 4) +#+end_src + * Keybinding List of own custom keybindings From 8898e371a45be72cb41f6cb89a85598a0f89fadb Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Tue, 28 May 2024 17:01:34 +0200 Subject: [PATCH 08/12] =?UTF-8?q?=F0=9F=94=A7=20(org)=20Make=20org-indent?= =?UTF-8?q?=20the=20default?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config.org b/config.org index 9c66ab9..33703ed 100644 --- a/config.org +++ b/config.org @@ -1131,6 +1131,12 @@ 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 + +#+begin_src emacs-lisp +(setq org-startup-indented t) +#+end_src + ** Org font adjustments I like to have larger headlines in Org for better identifying them. The configuration of [[https://config.daviwil.com/emacs#fonts-and-bullets][David Wilson]] was a large help in this regard. From 5658aeef70c0a609820434f16d2b7c33b7b80178 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Tue, 28 May 2024 17:01:58 +0200 Subject: [PATCH 09/12] =?UTF-8?q?=F0=9F=94=A7=20(markdown)=20Define=20unor?= =?UTF-8?q?dered=20list=20item=20prefix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.org b/config.org index 33703ed..0ca1b23 100644 --- a/config.org +++ b/config.org @@ -2060,6 +2060,8 @@ Markdown mode customizations. #+begin_src emacs-lisp (use-package markdown-mode :mode "\\.md\\'" + :config + (setq markdown-unordered-list-item-prefix " - ") :hook ((markdown-mode . visual-line-mode) (markdown-mode . (lambda () (display-line-numbers-mode -1))) (markdown-mode . variable-pitch-mode) From c026a9dd727b0bef85d866389b8eb56ee7f06fa9 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Tue, 28 May 2024 17:02:31 +0200 Subject: [PATCH 10/12] =?UTF-8?q?=E2=9C=A8=20Add=20slime=20package=20for?= =?UTF-8?q?=20Common=20Lisp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config.org b/config.org index 0ca1b23..98edf23 100644 --- a/config.org +++ b/config.org @@ -2068,6 +2068,15 @@ Markdown mode customizations. (markdown-mode . visual-fill-column-mode))) #+end_src +** Common Lisp + +#+begin_src emacs-lisp +(use-package slime + :config + (when on-macos + (setq inferior-lisp-program "/opt/homebrew/bin/sbcl"))) +#+end_src + * Emacs Multimedia System (EMMS) For notes, tasks, writing, and countless other things there is org-mode. From cf557b0bc1f83f10202ae27264acdf56f198e5f5 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Tue, 28 May 2024 17:02:53 +0200 Subject: [PATCH 11/12] =?UTF-8?q?=F0=9F=91=BD=20(elfeed)=20Switch=20to=20e?= =?UTF-8?q?lfeed-protocol-feeds=20var?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.org b/config.org index 98edf23..6ceff0a 100644 --- a/config.org +++ b/config.org @@ -2283,7 +2283,7 @@ Source: [[https://github.com/fasheng/elfeed-protocol][GitHub: fasheng/elfeed-pro (use-package elfeed-protocol :init ;; FreshRSS (self-hosted) - (setq elfeed-feeds '(("fever+https://mmk2410@rss.mmk2410.org" + (setq elfeed-protocol-feeds '(("fever+https://mmk2410@rss.mmk2410.org" :api-url "https://rss.mmk2410.org/api/fever.php" :use-authinfo t))) (elfeed-protocol-enable) From 28199ff810426ba2baa7db8d3150b799ef5d0bc9 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Tue, 28 May 2024 17:03:19 +0200 Subject: [PATCH 12/12] =?UTF-8?q?=E2=9C=A8=20Add=20pocket-reader=20package?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config.org b/config.org index 6ceff0a..a2ca1fd 100644 --- a/config.org +++ b/config.org @@ -2304,6 +2304,17 @@ Emacs client for Mastodon. mastodon-active-user "mmk2410")) #+end_src +* Pocket + + Emacs client for Pocket reading list (getpocket.com) + + [[https://github.com/alphapapa/pocket-reader.el][GitHub: alphapapa/pocket-reader.el]] + + +#+begin_src emacs-lisp +(use-package pocket-reader) +#+end_src + * mu4e Managing e-mails is maybe one of the most critical tasks in my life. Over the last years I tried countless different clients, including the famous (neo)mutt, KMail, and Thunderbird. But it seems that I always go back to one specific: mu4e. Maybe because it is integrated in Emacs and Org-mode, maybe because I like using a keyboard-focused client and that's where I end. I don't now. But what I know is: I enjoy using it!