Update emacs.org
This commit is contained in:
parent
39e3a146ab
commit
12ab87fbf7
|
@ -181,98 +181,104 @@ Should make startup faster, taken from doom-emacs
|
||||||
#+end_src
|
#+end_src
|
||||||
* Custom Modeline
|
* Custom Modeline
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq mode-line-format nil)
|
(setq mode-line-format nil)
|
||||||
|
|
||||||
(kill-local-variable 'mode-line-format)
|
(kill-local-variable 'mode-line-format)
|
||||||
|
|
||||||
(force-mode-line-update)
|
(force-mode-line-update)
|
||||||
|
|
||||||
(setq-default mode-line-format
|
(setq-default mode-line-format
|
||||||
`("%e"
|
`("%e"
|
||||||
sakoline-evil-mode
|
sakoline-evil-mode
|
||||||
|
|
||||||
;; begin BUFFER name
|
;; begin BUFFER name
|
||||||
" "
|
" "
|
||||||
|
|
||||||
sakoline-buffer-name
|
sakoline-buffer-name
|
||||||
|
|
||||||
" "
|
" "
|
||||||
sakoline-buffer-state
|
sakoline-buffer-state
|
||||||
sakoline-major-mode
|
sakoline-major-mode
|
||||||
|
|
||||||
))
|
))
|
||||||
|
|
||||||
|
(defvar-local sakoline-buffer-name
|
||||||
|
'(:eval
|
||||||
|
(propertize (buffer-name) 'face '(:foreground "#669999")))
|
||||||
|
"Mode line variable that shows the buffer name.")
|
||||||
|
|
||||||
|
(put 'sakoline-buffer-name 'risky-local-variable t)
|
||||||
|
|
||||||
(defvar-local sakoline-buffer-name
|
(defface sakoline-major-mode-color
|
||||||
'(:eval
|
'((t :foreground "grey"))
|
||||||
(propertize (buffer-name) 'face '(:foreground "#669999")))
|
"Major Mode color for sakoline.")
|
||||||
"Mode line variable that shows the buffer name.")
|
|
||||||
|
|
||||||
(put 'sakoline-buffer-name 'risky-local-variable t)
|
(defun sakoline--major-mode-name ()
|
||||||
|
"Return Capitalized Major Mode"
|
||||||
|
(capitalize (symbol-name major-mode)))
|
||||||
|
|
||||||
(defface sakoline-major-mode-color
|
(defvar-local sakoline-major-mode
|
||||||
'((t :foreground "grey"))
|
'(:eval
|
||||||
"Major Mode color for sakoline.")
|
(propertize (sakoline--major-mode-name) 'face 'sakoline-major-mode-color)))
|
||||||
|
|
||||||
(defun sakoline--major-mode-name ()
|
(put 'sakoline-major-mode 'risky-local-variable t)
|
||||||
"Return Capitalized Major Mode"
|
|
||||||
(capitalize (symbol-name major-mode)))
|
|
||||||
|
|
||||||
(defvar-local sakoline-major-mode
|
(defface sakoline-evil-visual-color
|
||||||
'(:eval
|
'((t :background "#6600cc" :foreground "black"))
|
||||||
(propertize (sakoline--major-mode-name) 'face 'sakoline-major-mode-color)))
|
"Evil Visual Color")
|
||||||
|
|
||||||
(put 'sakoline-major-mode 'risky-local-variable t)
|
(defface sakoline-evil-normal-color
|
||||||
|
'((t :background "#99ff99" :foreground "black"))
|
||||||
|
"Evil Visual Color")
|
||||||
|
|
||||||
(defface sakoline-evil-visual-color
|
(defface sakoline-evil-insert-color
|
||||||
'((t :background "#6600cc" :foreground "black"))
|
'((t :background "#00cc66" :foreground "black"))
|
||||||
"Evil Visual Color")
|
"Evil Visual Color")
|
||||||
|
|
||||||
(defface sakoline-evil-normal-color
|
(defface sakoline-evil-emacs-color
|
||||||
'((t :background "#99ff99" :foreground "black"))
|
'((t :background "#9900ff" :foreground "black"))
|
||||||
"Evil Visual Color")
|
"Evil Visual Color")
|
||||||
|
|
||||||
(defface sakoline-evil-insert-color
|
(defface sakoline-evil-operator-color
|
||||||
'((t :background "#00cc66" :foreground "black"))
|
'((t :background "#ff3300" :foreground "black"))
|
||||||
"Evil Visual Color")
|
"Evil Visual Color")
|
||||||
|
|
||||||
(defface sakoline-evil-emacs-color
|
(defvar-local sakoline-evil-mode
|
||||||
'((t :background "#9900ff" :foreground "black"))
|
'(:eval (cond
|
||||||
"Evil Visual Color")
|
((eq evil-state 'visual) (propertize " VISUAL " 'face 'sakoline-evil-visual-color ))
|
||||||
|
((eq evil-state 'normal) (propertize " NORMAL " 'face 'sakoline-evil-normal-color ))
|
||||||
|
((eq evil-state 'insert) (propertize " INSERT " 'face 'sakoline-evil-insert-color ))
|
||||||
|
((eq evil-state 'emacs) (propertize " EMACS " 'face 'sakoline-evil-emacs-color ))
|
||||||
|
((eq evil-state 'operator) (propertize " OPERATOR " 'face 'sakoline-evil-operator-color))
|
||||||
|
"Get current evil mode state")))
|
||||||
|
|
||||||
(defface sakoline-evil-operator-color
|
(put 'sakoline-evil-mode 'risky-local-variable t)
|
||||||
'((t :background "#ff3300" :foreground "black"))
|
|
||||||
"Evil Visual Color")
|
|
||||||
|
|
||||||
(defvar-local sakoline-evil-mode
|
(defface sakoline-buffer-state-readonly
|
||||||
'(:eval (cond
|
'((t :foreground "red"))
|
||||||
((eq evil-state 'visual) (propertize " VISUAL " 'face 'sakoline-evil-visual-color ))
|
"Face for read-only buffer")
|
||||||
((eq evil-state 'normal) (propertize " NORMAL " 'face 'sakoline-evil-normal-color ))
|
(defface sakoline-buffer-state-modified
|
||||||
((eq evil-state 'insert) (propertize " INSERT " 'face 'sakoline-evil-insert-color ))
|
'((t :foreground "orange"))
|
||||||
((eq evil-state 'emacs) (propertize " EMACS " 'face 'sakoline-evil-emacs-color ))
|
"Face for modified buffer")
|
||||||
((eq evil-state 'operator) (propertize " OPERATOR " 'face 'sakoline-evil-operator-color))
|
|
||||||
"Get current evil mode state")))
|
|
||||||
|
|
||||||
(put 'sakoline-evil-mode 'risky-local-variable t)
|
(defvar-local sakoline-buffer-state
|
||||||
|
'(:eval
|
||||||
|
(cond
|
||||||
|
(buffer-read-only
|
||||||
|
(propertize ">:("
|
||||||
|
'face 'sakoline-buffer-state-readonly
|
||||||
|
'help-echo "buffer is read only"))
|
||||||
|
((buffer-modified-p)
|
||||||
|
(propertize "!!!"
|
||||||
|
'face 'sakoline-buffer-state-modified)))))
|
||||||
|
|
||||||
(defface sakoline-buffer-state-readonly
|
;; some weird spacing bullshit
|
||||||
'((t :foreground "red"))
|
;; weird how its not built in
|
||||||
"Face for read-only buffer")
|
(defun sakoline-line-render (left right)
|
||||||
(defface sakoline-buffer-state-modified
|
"Return a string of `window-width' length containing LEFT, and RIGHT
|
||||||
'((t :foreground "orange"))
|
aligned respectively."
|
||||||
"Face for modified buffer")
|
(let* ((available-width (- (window-width) (length left) 2)))
|
||||||
|
(format (format " %%s %%%ds " available-width) left right)))
|
||||||
(defvar-local sakoline-buffer-state
|
|
||||||
'(:eval
|
|
||||||
(cond
|
|
||||||
(buffer-read-only
|
|
||||||
(propertize ">:("
|
|
||||||
'face 'sakoline-buffer-state-readonly
|
|
||||||
'help-echo "buffer is read only"))
|
|
||||||
((buffer-modified-p)
|
|
||||||
(propertize "!!!"
|
|
||||||
'face 'sakoline-buffer-state-modified)))))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
* Packages
|
* Packages
|
||||||
** Log state
|
** Log state
|
||||||
|
@ -604,7 +610,7 @@ Should make startup faster, taken from doom-emacs
|
||||||
:straight t
|
:straight t
|
||||||
:hook (org-mode . org-indent-mode)
|
:hook (org-mode . org-indent-mode)
|
||||||
:config
|
:config
|
||||||
(setq org-ellipsis "▼")
|
(setq org-ellipsis " ↓")
|
||||||
(setq org-agenda-start-with-log-mode t)
|
(setq org-agenda-start-with-log-mode t)
|
||||||
(setq org-log-done 'time)
|
(setq org-log-done 'time)
|
||||||
(setq org-log-into-drawer t)
|
(setq org-log-into-drawer t)
|
||||||
|
@ -734,6 +740,7 @@ We have to compete with notion somehow right?
|
||||||
*** Olivetti
|
*** Olivetti
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package olivetti
|
(use-package olivetti
|
||||||
|
:straight t
|
||||||
:hook (org-mode . (lambda () (interactive) (olivetti-mode) (olivetti-set-width 100))))
|
:hook (org-mode . (lambda () (interactive) (olivetti-mode) (olivetti-set-width 100))))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Org-Roam
|
** Org-Roam
|
||||||
|
@ -1050,9 +1057,12 @@ make sure to setup authinfo
|
||||||
#+end_src
|
#+end_src
|
||||||
***** Markdown
|
***** Markdown
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package markdown-mode
|
(use-package markdown-mode
|
||||||
:straight t
|
:straight t
|
||||||
:hook (markdown-mode . visual-line-mode))
|
:hook (markdown-mode . visual-line-mode))
|
||||||
|
|
||||||
|
(use-package markdown-preview-mode
|
||||||
|
:straight t)
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Commenter
|
*** Commenter
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
Loading…
Reference in a new issue