From cdd90d4020b85f98bca0b89300e4580d13164bc9 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Wed, 14 Jun 2023 17:15:04 +0200 Subject: [PATCH 1/6] =?UTF-8?q?=F0=9F=91=94=20(prog-mode)=20Enable=20visua?= =?UTF-8?q?l=20line=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 1 + 1 file changed, 1 insertion(+) diff --git a/config.org b/config.org index 23314ae..52c61e6 100644 --- a/config.org +++ b/config.org @@ -112,6 +112,7 @@ Sources: (setq-default truncate-lines t) (setq-default global-visual-line-mode t) (add-hook 'org-mode-hook 'visual-line-mode) +(add-hook 'prog-mode-hook 'visual-line-mode) #+end_src ** Delete trailing white-space From 8010f920bdf38e569e392f11a1adc002f97f58ba Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Wed, 14 Jun 2023 17:16:44 +0200 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=91=94=20(prog-mode)=20Enable=20highl?= =?UTF-8?q?ight=20line=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 1 + 1 file changed, 1 insertion(+) diff --git a/config.org b/config.org index 52c61e6..e2b68f1 100644 --- a/config.org +++ b/config.org @@ -342,6 +342,7 @@ Source: [[https://stackoverflow.com/a/744681][Stack Overflow: Unable to hide wel #+begin_src emacs-lisp (add-hook 'text-mode-hook #'hl-line-mode) +(add-hook 'prog-mode-hook #'hl-line-mode) (add-hook 'org-agenda-finalize-hook #'hl-line-mode) #+end_src From ceb3925245a23bedca5f3f0e29fdf9928f13f35f Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Wed, 14 Jun 2023 17:28:47 +0200 Subject: [PATCH 3/6] =?UTF-8?q?=E2=9C=A8=F0=9F=92=84=20Add=20function=20fo?= =?UTF-8?q?r=20enlarging=20fonts=20for=20presentations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/config.org b/config.org index e2b68f1..285ae0d 100644 --- a/config.org +++ b/config.org @@ -415,17 +415,38 @@ 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 my-font "Jetbrains Mono 11") - -(set-frame-font my-font nil t) +(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) - (set-frame-font my-font nil t))) + (set-frame-font mmk2410/frame-font nil t))) -(set-face-attribute 'default nil :font "Jetbrains Mono" :height 110 :weight 'regular) -(set-face-attribute 'variable-pitch nil :font "Open Sans" :height 130 :weight 'regular) -(set-face-attribute 'fixed-pitch nil :font "Jetbrains Mono" :height 110 :weight 'regular) +(defun mmk2410/display-normal-typeface-size () + (interactive) + (set-frame-font mmk2410/frame-font nil t) + (set-face-attribute 'default nil :font mmk2410/fixed-font-name :height mmk2410/fixed-font-height :weight 'regular) + (set-face-attribute 'variable-pitch nil :font mmk2410/variable-font-name :height mmk2410/variable-font-height :weight 'regular) + (set-face-attribute 'fixed-pitch nil :font mmk2410/fixed-font-name :height mmk2410/fixed-font-height :weight 'regular)) + +(mmk2410/display-normal-typeface-size) +#+end_src + +Sometimes (most often a work) I share my screen during a video call to discuss some code. Since I personally like to see larger fonts on video calls and I don't know what display size and resolution the other participants have I wrote two functions for resizing Emacs. + +#+begin_src emacs-lisp +(defun mmk2410/display-present-typeface-size () + (interactive) + (set-frame-font mmk2410/frame-font-present nil t) + (set-face-attribute 'default nil :font mmk2410/fixed-font-name :height mmk2410/fixed-font-present-height :weight 'regular) + (set-face-attribute 'variable-pitch nil :font mmk2410/variable-font-name :height mmk2410/variable-font-present-height :weight 'regular) + (set-face-attribute 'fixed-pitch nil :font mmk2410/fixed-font-name :height mmk2410/fixed-font-present-height :weight 'regular)) #+end_src ** Set theme From c6919168dedc1dbfaf20570763a64ddbaf361aa1 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Wed, 14 Jun 2023 17:35:03 +0200 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=92=84=20Diminish=20some=20modes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config.org b/config.org index 285ae0d..24a7328 100644 --- a/config.org +++ b/config.org @@ -670,7 +670,12 @@ Source: [[https://github.com/myrjola/diminish.el][GitHub: myrjola/diminish.el]] (diminish 'buffer-face-mode) (diminish 'flyspell-mode) (diminish 'org-indent-mode) - (diminish 'visual-line-mode)) + (diminish 'org-cdlatex-mode) + (diminish 'visual-line-mode) + (diminish 'buffer-face-mode) + (diminish 'highlight-indent-guides-mode) + (diminish 'eldoc-mode) + (diminish 'subword-mode)) #+end_src ** crux From 82f9c7d6bac44fd9854b393f7cb8502bf281d877 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Wed, 14 Jun 2023 17:42:30 +0200 Subject: [PATCH 5/6] =?UTF-8?q?=E2=9C=A8=20(vertico)=20Hide=20commands=20t?= =?UTF-8?q?hat=20do=20not=20work=20in=20the=20current=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config.org b/config.org index 24a7328..2f9f985 100644 --- a/config.org +++ b/config.org @@ -824,7 +824,10 @@ Vertico is a minimal completion UI that uses core Emacs functionality whenever p (vertico-mode) (setq vertico-scroll-margin 0) (setq vertico-resize t) - (setq vertico-cycle t)) + (setq vertico-cycle t) + ;; Hide commands in M-x which do not work in the current mode. + (setq read-extended-command-predicate + #'command-completion-default-include-p)) #+end_src ** orderless From 5ab6ebb1cc5ed827a4cf3645a68079ced87a14f6 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Wed, 14 Jun 2023 17:42:56 +0200 Subject: [PATCH 6/6] =?UTF-8?q?=E2=9C=A8=20(Work)=20Include=20work-specifi?= =?UTF-8?q?c=20config=20on=20work=20machines?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config.org b/config.org index 2f9f985..47244b1 100644 --- a/config.org +++ b/config.org @@ -2634,3 +2634,13 @@ Since version 27 Emacs features a tab bar. In contrast to e.g. a browser a tab d :load-path "packages/" :bind ("C-c f" . mmk2410/tab-bar/body)) #+end_src + +* Work + +For my workplace I have some additional packages and configuration that I keep in an own file. + +#+begin_src emacs-lisp +(if (mmk2410/work) + (org-babel-load-file + (expand-file-name "work/config.org" user-emacs-directory))) +#+end_src