diff --git a/config.org b/config.org index 8c3ea90..732ecac 100644 --- a/config.org +++ b/config.org @@ -55,7 +55,7 @@ (if (file-exists-p custom-file) (load-file custom-file))) - #+END_SRC + #+END_SRC * Konfigurationsdatei ** Konfigurationsdatei @@ -96,6 +96,86 @@ :bind ("" . 'restart-emacs)) #+END_SRC +* Font +** Font + #+BEGIN_SRC emacs-lisp + ;; for unicode + (when (display-graphic-p) + (set-fontset-font "fontset-default" nil + (font-spec :size 20 :name "Symbola"))) + ;; for emoji + (set-fontset-font + t + '(#x1f300 . #x1fad0) + (cond + ((member "Noto Color Emoji" (font-family-list)) "Noto Color Emoji") + ((member "Noto Emoji" (font-family-list)) "Noto Emoji") + ((member "Segoe UI Emoji" (font-family-list)) "Segoe UI Emoji") + ((member "Symbola" (font-family-list)) "Symbola") + ((member "Apple Color Emoji" (font-family-list)) "Apple Color Emoji"))) + + ;; font to use + (defconst artr/default-font-family "Source Code Pro") + (defconst artr/default-font-size 100) + (defconst artr/default-icon-size 15) + + (set-face-attribute 'default nil + :family artr/default-font-family + :height artr/default-font-size) + #+END_SRC + +** Schriftgröße anpassen + #+BEGIN_SRC emacs-lisp + (defun artr/adjust-font-size (height) + "Adjust font size by given height. If height is '0', reset font +size. This function also handles icons and modeline font sizes." + (interactive "nHeight ('0' to reset): ") + (let ((new-height (if (zerop height) + artr/default-font-size + (+ height (face-attribute 'default :height))))) + (set-face-attribute 'default nil :height new-height) + (set-face-attribute 'mode-line nil :height new-height) + (set-face-attribute 'mode-line-inactive nil :height new-height) + (message "Font size: %s" new-height))) + #+END_SRC + +** Schrift vergrößern + #+BEGIN_SRC emacs-lisp + (defun artr/increase-font-size () + "Increase font size by 0.5 (5 in height)." + (interactive) + (artr/adjust-font-size 5)) + #+END_SRC + +** Schrift verkleinern + #+BEGIN_SRC emacs-lisp + (defun artr/decrease-font-size () + "Increase font size by 0.5 (5 in height)." + (interactive) + (artr/adjust-font-size -5)) + #+END_SRC + +** Schriftgröße zurücksetzen + #+BEGIN_SRC emacs-lisp + (defun artr/reset-font-size () + "Reset font size according to the `artr/default-font-size'." + (interactive) + (artr/adjust-font-size 0)) + #+END_SRC + +** Keybindings + #+BEGIN_SRC emacs-lisp + (global-set-key (kbd "C--") 'artr/decrease-font-size) + (global-set-key (kbd "C-*") 'artr/increase-font-size) + (global-set-key (kbd "C-0") 'artr/reset-font-size) + #+END_SRC + +* Icons +** Icons + #+BEGIN_SRC emacs-lisp + (use-package all-the-icons) + #+END_SRC + * Magit Magit ist ein git-Client für Emacs: [[https://magit.vc/manual/magit/#Top][Magit User Manual]] #+BEGIN_SRC emacs-lisp @@ -149,27 +229,27 @@ #+END_SRC ** anordnen - | Key | Funktion | - |-------------+--------------------------------| - | C-c | vorherige Fensterkonfiguration | - | C-c | nächste Fensterkonfiguration | + | Key | Funktion | + |-------------+--------------------------------| + | C-c | vorherige Fensterkonfiguration | + | C-c | nächste Fensterkonfiguration | - #+BEGIN_SRC emacs-lisp + #+BEGIN_SRC emacs-lisp (use-package winner :config (winner-mode)) - #+END_SRC + #+END_SRC - [[https://depp.brause.cc/eyebrowse/][eyebrowse]] - Es können Fensterkonfigurationen angelegt und wiederhergestellt werden. Das Speichern der Konfigurationen passiert in sogenannten Slots, die von 0,... durchnummeriert werden. - Mit C-c w 0 kann dann direkt die zugehörige Konfiguration wiederhergestellt werden. - | Key | Funktion | - |---------+-------------------------------| - | C-c w | key-map | - | C-c w n | neue Fensterkonfiguration | - | C-c w . | Fensterkonfiguration wechseln | - | C-c w , | Fensterkonfiguration benennen | + [[https://depp.brause.cc/eyebrowse/][eyebrowse]] + Es können Fensterkonfigurationen angelegt und wiederhergestellt werden. Das Speichern der Konfigurationen passiert in sogenannten Slots, die von 0,... durchnummeriert werden. + Mit C-c w 0 kann dann direkt die zugehörige Konfiguration wiederhergestellt werden. + | Key | Funktion | + |---------+-------------------------------| + | C-c w | key-map | + | C-c w n | neue Fensterkonfiguration | + | C-c w . | Fensterkonfiguration wechseln | + | C-c w , | Fensterkonfiguration benennen | - #+BEGIN_SRC emacs-lisp + #+BEGIN_SRC emacs-lisp (use-package eyebrowse :bind (("C-c w ." . eyebrowse-switch-to-window-config) ("C-c w ," . eyebrowse-rename-window-config) @@ -181,7 +261,7 @@ eyebrowse-mode-line-style 'always eyebrowse-mode-line-separator "|") (eyebrowse-mode t)) - #+END_SRC + #+END_SRC ** bezeichnen Die Fenster werden mit "Projektname | Dateiname" bezeichnet. #+BEGIN_SRC emacs-lisp