1
0
Fork 0
mirror of https://github.com/Horhik/dotfiles.git synced 2024-11-21 16:11:26 +00:00

update emacs config

This commit is contained in:
horhik 2023-03-11 14:40:35 +03:00
parent 1a54a180b7
commit 1f4b58f9db
2 changed files with 182 additions and 170 deletions

View file

@ -97,7 +97,7 @@
*** Disbling line numbers
#+begin_src emacs-lisp
;(column-number-mode)
(global-display-line-numbers-mode 0)
(global-display-line-numbers-mode 1)
(dolist (mode '(org-mode-hook
term-mode-hook
shell-mode-hook
@ -288,6 +288,16 @@
* Org mode setup
** Basic
*
*** Margin setup
#+begin_src emacs-lisp
(defun my/setup-org-margins()
(setq visual-fill-column-center-text t)
(visual-fill-column-mode t)
(visual-line-mode t)
)
#+end_src
*** Other
#+begin_src emacs-lisp
(defun my/org-mode-setup()
(auto-fill-mode 0)
@ -305,6 +315,7 @@
(org-mode . variable-pitch-mode)
(org-mode . org-indent-mode)
(org-mode . prettify-symbols-mode)
(org-mode . my/setup-org-margins)
)
:config
(require 'org-habit)
@ -314,6 +325,7 @@
(setq org-agenda-start-with-log-mode t)
(setq org-log-done 'time)
(setq org-log-into-drawer t)
(setq org-hide-emphasis-markers t)
;; Make sure org-indent face is available
@ -322,28 +334,28 @@
(add-hook 'org-agenda-finalize-hook #'hl-line-mode)
(set-face-attribute 'org-document-title nil :font "FiraSans" :weight 'bold :height 1.3)
(set-face-attribute 'org-document-title nil :font "mononoki" :weight 'bold :height 1.3)
(dolist (face '((org-level-1 . 1.2)
(org-level-2 . 1.1)
(org-level-3 . 1.0)
(org-level-4 . 1.0)
(org-level-5 . 1.0)
(org-level-6 . 1.0)
(org-level-7 . 1.0)
(org-level-8 . 1.0)))
(set-face-attribute (car face) nil :font "FiraSans" :weight 'bold :height (cdr face)))
;; (dolist (face '((org-level-1 . 1.0)
;; (org-level-2 . 1.0)
;; (org-level-3 . 1.0)
;; (org-level-4 . 1.0)
;; (org-level-5 . 1.0)
;; (org-level-6 . 1.0)
;; (org-level-7 . 1.0)
;; (org-level-8 . 1.0)))
;; (set-face-attribute (car face) nil :font "mononoki" :weight 'bold :height (cdr face)))
;; Ensure that anything that should be fixed-pitch in Org files appears that way
(set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)
(set-face-attribute 'org-table nil :inherit 'fixed-pitch)
(set-face-attribute 'org-formula nil :inherit 'fixed-pitch)
(set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
;(set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)
;(set-face-attribute 'org-table nil :inherit 'fixed-pitch)
;(set-face-attribute 'org-formula nil :inherit 'fixed-pitch)
;(set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
;(set-face-attribute 'org-indent nil :inherit '(org-hide fixed-pitch))
(set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch)
; (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
;(set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
;(set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
; (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch)
(setq org-agenda-files
'(
@ -381,7 +393,7 @@
(sequence "IDEA(I)" "DREAM(D)" "READ(R)" "|" "DONE(d!)" "CANC(k@)")
))
(setq org-agenda-custom-commands org-agenda-settings)
(setq org-refile-targets
(setq org-refile-targets
'((("~/GTD/tasks.org") :maxlevel . 2)
(("~/GTD/projects.org") :maxlevel . 2)
(("~/GTD/backlog.org") :maxlevel . 1)
@ -1006,11 +1018,11 @@ https://github.com/emacs-eaf/emacs-application-framework
:host github
:repo "emacs-eaf/emacs-application-framework"
:files ("*.el" "*.py" "core" "app" "*.json")
:includes (eaf-pdf-viewer eaf-browser eaf-music-player eaf-image-viewer eaf-org-previewer eaf-markdown-previewer) ; Straight won't try to search for these packages when we make further use-package invocations for them
:includes ( eaf-browser ) ; Straight won't try to search for these packages when we make further use-package invocations for them
:pre-build (("python" "install-eaf.py" "--install" "pdf-viewer" "browser" "music-player" "image-viewer" "org-previewer" "markdown-previewer" "evil" "--ignore-sys-deps"))
:pre-build (("python" "install-eaf.py" "--install" "pdf-viewer" "browser" "evil" "--ignore-sys-deps"))
)
:init (evil-set-initial-state 'eaf-mode 'emacs)) ; Evil mode doesn't work well with eaf keybindings.
:config
@ -1021,11 +1033,6 @@ https://github.com/emacs-eaf/emacs-application-framework
:custom
(eaf-browser-continue-where-left-off t)
(eaf-browser-enable-adblocker t))
(use-package eaf-pdf-viewer)
(use-package eaf-music-player)
(use-package eaf-image-viewer)
(use-package eaf-org-previewer)
(use-package eaf-markdown-previewer)
;(setq spacemacs-cmds)
@ -1173,3 +1180,9 @@ https://github.com/emacs-eaf/emacs-application-framework
(global-set-key (kbd "C-c +") 'increment-number-at-point)
#+end_src
* HOWM
#+begin_src emacs-lisp
(use-package howm
:straight t
)
#+end_src

View file

@ -36,8 +36,7 @@
(custom-set-faces
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
@ -67,7 +66,7 @@
(load-theme 'solarized-dark t nil)
;(column-number-mode)
(global-display-line-numbers-mode 0)
(global-display-line-numbers-mode 1)
(dolist (mode '(org-mode-hook
term-mode-hook
shell-mode-hook
@ -213,6 +212,12 @@
:states 'motion
:prefix "SPC")
(defun my/setup-org-margins()
(setq visual-fill-column-center-text t)
(visual-fill-column-mode t)
(visual-line-mode t)
)
(defun my/org-mode-setup()
(auto-fill-mode 0)
(visual-line-mode 1)
@ -229,6 +234,7 @@
(org-mode . variable-pitch-mode)
(org-mode . org-indent-mode)
(org-mode . prettify-symbols-mode)
(org-mode . my/setup-org-margins)
)
:config
(require 'org-habit)
@ -238,6 +244,7 @@
(setq org-agenda-start-with-log-mode t)
(setq org-log-done 'time)
(setq org-log-into-drawer t)
(setq org-hide-emphasis-markers t)
;; Make sure org-indent face is available
@ -246,28 +253,28 @@
(add-hook 'org-agenda-finalize-hook #'hl-line-mode)
(set-face-attribute 'org-document-title nil :font "FiraSans" :weight 'bold :height 1.3)
(set-face-attribute 'org-document-title nil :font "mononoki" :weight 'bold :height 1.3)
(dolist (face '((org-level-1 . 1.2)
(org-level-2 . 1.1)
(org-level-3 . 1.0)
(org-level-4 . 1.0)
(org-level-5 . 1.0)
(org-level-6 . 1.0)
(org-level-7 . 1.0)
(org-level-8 . 1.0)))
(set-face-attribute (car face) nil :font "FiraSans" :weight 'bold :height (cdr face)))
;; (dolist (face '((org-level-1 . 1.0)
;; (org-level-2 . 1.0)
;; (org-level-3 . 1.0)
;; (org-level-4 . 1.0)
;; (org-level-5 . 1.0)
;; (org-level-6 . 1.0)
;; (org-level-7 . 1.0)
;; (org-level-8 . 1.0)))
;; (set-face-attribute (car face) nil :font "mononoki" :weight 'bold :height (cdr face)))
;; Ensure that anything that should be fixed-pitch in Org files appears that way
(set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)
(set-face-attribute 'org-table nil :inherit 'fixed-pitch)
(set-face-attribute 'org-formula nil :inherit 'fixed-pitch)
(set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
;(set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)
;(set-face-attribute 'org-table nil :inherit 'fixed-pitch)
;(set-face-attribute 'org-formula nil :inherit 'fixed-pitch)
;(set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
;(set-face-attribute 'org-indent nil :inherit '(org-hide fixed-pitch))
(set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch)
; (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
;(set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
;(set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
; (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch)
(setq org-agenda-files
'(
@ -826,11 +833,11 @@ buffer's text scale."
:host github
:repo "emacs-eaf/emacs-application-framework"
:files ("*.el" "*.py" "core" "app" "*.json")
:includes (eaf-pdf-viewer eaf-browser eaf-music-player eaf-image-viewer eaf-org-previewer eaf-markdown-previewer) ; Straight won't try to search for these packages when we make further use-package invocations for them
:includes ( eaf-browser ) ; Straight won't try to search for these packages when we make further use-package invocations for them
:pre-build (("python" "install-eaf.py" "--install" "pdf-viewer" "browser" "music-player" "image-viewer" "org-previewer" "markdown-previewer" "evil" "--ignore-sys-deps"))
:pre-build (("python" "install-eaf.py" "--install" "pdf-viewer" "browser" "evil" "--ignore-sys-deps"))
)
:init (evil-set-initial-state 'eaf-mode 'emacs)) ; Evil mode doesn't work well with eaf keybindings.
:config
@ -841,11 +848,6 @@ buffer's text scale."
:custom
(eaf-browser-continue-where-left-off t)
(eaf-browser-enable-adblocker t))
(use-package eaf-pdf-viewer)
(use-package eaf-music-player)
(use-package eaf-image-viewer)
(use-package eaf-org-previewer)
(use-package eaf-markdown-previewer)
;(setq spacemacs-cmds)
@ -961,10 +963,7 @@ buffer's text scale."
(replace-match (number-to-string (1+ (string-to-number (match-string 0))))))
(global-set-key (kbd "C-c +") 'increment-number-at-point)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(org-agenda-files
'("/home/horhik/GTD/daily.org" "/home/horhik/GTD/tasks.org" "/home/horhik/GTD/inbox.org" "/home/horhik/GTD/done.org" "/home/horhik/GTD/projects.org" "/home/horhik/GTD/backlog.org" "/home/horhik/GTD/watchlist.org" "/home/horhik/GTD/readlist.org")))
(use-package howm
:straight t
)