diff --git a/config.org b/config.org index 23314ae..47244b1 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 @@ -341,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 @@ -413,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 @@ -647,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 @@ -796,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 @@ -2603,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