diff --git a/global/.emacs.d/init.el b/global/.emacs.d/init.el index 3b716c0..1860be3 100644 --- a/global/.emacs.d/init.el +++ b/global/.emacs.d/init.el @@ -157,23 +157,61 @@ (mapcar #'(lambda (c) (if (equal c ?\[) ?\( (if (equal c ?\]) ?\) c))) string-to-transform))) (when (display-graphic-p) - (let* ((variable-tuple - (cond ((x-list-fonts "JetBrainsMono Nerd Font") '(:font "JetBrainsMono Nerd Font")) - (nil (warn "Cannot find JetBrainsMono Nerd Font. Please install it.")))) - (base-font-color (face-foreground 'default nil 'default)) - (headline `(:inherit default :weight bold :foreground ,base-font-color))) + (setq org-ellipsis " [+]") + (add-hook 'org-mode-hook 'variable-pitch-mode) - (custom-theme-set-faces - 'user - `(org-level-8 ((t (,@headline ,@variable-tuple)))) - `(org-level-7 ((t (,@headline ,@variable-tuple)))) - `(org-level-6 ((t (,@headline ,@variable-tuple)))) - `(org-level-5 ((t (,@headline ,@variable-tuple)))) - `(org-level-4 ((t (,@headline ,@variable-tuple :height 1.0)))) - `(org-level-3 ((t (,@headline ,@variable-tuple :height 1.1)))) - `(org-level-2 ((t (,@headline ,@variable-tuple :height 1.2)))) - `(org-level-1 ((t (,@headline ,@variable-tuple :height 1.3)))) - `(org-document-title ((t (,@headline ,@variable-tuple :height 1.4 :underline nil))))))) + (let* ((variable-tuple + (cond + ((x-list-fonts "SauceCodePro Nerd Font Mono") '(:family "SauceCodePro Nerd Font Mono" :height 120)) + (t (warn "Cannot find any suitable variable-pitch font.") nil))) + (fixed-tuple + (cond + ((x-list-fonts "JetBrainsMono Nerd Font") '(:family "JetBrainsMono Nerd Font")) + (t (warn "Cannot find any suitable fixed-pitch font.") nil))) + (base-font-color (face-foreground 'default nil 'default)) + (headline `(:inherit default :weight bold :foreground ,base-font-color))) + + ;; Подсветка текущей строки + (global-hl-line-mode t) + + ;; Установка стилей для заголовков + (custom-theme-set-faces + 'user + `(org-level-8 ((t (,@headline ,@variable-tuple)))) + `(org-level-7 ((t (,@headline ,@variable-tuple)))) + `(org-level-6 ((t (,@headline ,@variable-tuple)))) + `(org-level-5 ((t (,@headline ,@variable-tuple)))) + `(org-level-4 ((t (,@headline ,@variable-tuple :height 1.1)))) + `(org-level-3 ((t (,@headline ,@variable-tuple :height 1.25)))) + `(org-level-2 ((t (,@headline ,@variable-tuple :height 1.5)))) + `(org-level-1 ((t (,@headline ,@variable-tuple :height 1.75)))) + `(org-document-title ((t (,@headline ,@variable-tuple :height 2.0 :underline nil))))) + + ;; Установка других стилей + (custom-set-faces + `(variable-pitch ((t ,@variable-tuple))) + `(fixed-pitch ((t ,@fixed-tuple))) + '(org-ellipsis ((t (:inherit fixed-pitch :foreground "gray40" :underline nil)))) + '(org-block ((t (:inherit fixed-pitch)))) + '(org-block-begin-line ((t (:inherit fixed-pitch)))) + '(org-block-end-line ((t (:inherit fixed-pitch)))) + '(org-src ((t (:inherit fixed-pitch)))) + '(org-properties ((t (:inherit fixed-pitch)))) + '(org-code ((t (:inherit (shadow fixed-pitch))))) + '(org-date ((t (:inherit (shadow fixed-pitch))))) + '(org-document-info ((t (:inherit (shadow fixed-pitch))))) + '(org-document-info-keyword ((t (:inherit (shadow fixed-pitch))))) + '(org-drawer ((t (:inherit (shadow fixed-pitch))))) + '(org-indent ((t (:inherit (org-hide fixed-pitch))))) + `(org-link ((t (:inherit fixed-pitch :foreground "tomato" :underline t)))) + '(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch) :height 0.8)))) + '(org-property-value ((t (:inherit fixed-pitch))) t) + '(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch))))) + '(org-table ((t (:inherit fixed-pitch)))) + '(org-tag ((t (:inherit (shadow fixed-pitch) :weight bold :height 0.8)))) + '(org-verbatim ((t (:background "yellow" :foreground "black")))) + '(org-emphasis-alist ((t (:background "yellow" :foreground "black")))) + ))) (setq org-capture-templates '( @@ -227,8 +265,8 @@ :empty-lines 1) ("L" "Unselected web capture" - entry (file "~/org/web-links.org") - "** %(transform-square-brackets-to-round-ones \"%:description\")%?\n:PROPERTIES:\n:Created: %T\n:END:\n- %:link\n" + entry (file+headline "~/org/web-links.org" "Web links") + "* %(transform-square-brackets-to-round-ones \"%:description\")%?\n:PROPERTIES:\n:Created: %T\n:END:\n- %:link\n" :empty-lines 1))) (setq org-todo-keywords @@ -277,6 +315,7 @@ ("hobby" . ?B) ("research" . ?G) ("article" . ?I) + ("job" . ?J) (:endgroup) ;; Special tags @@ -297,6 +336,7 @@ ("music") ("youtube") ("trash") + ("devsecops") )) @@ -324,6 +364,7 @@ ("research" . (:foreground "deep sky blue" :weight bold)) ("meeting" . (:foreground "magenta" :weight bold)) ("CRITICAL" . (:foreground "red1" :weight bold)) + ("job" . (:foreground "medium spring green" :weight bold)) ) )