143 lines
3.7 KiB
Org Mode
143 lines
3.7 KiB
Org Mode
|
* Looks
|
||
|
** Font
|
||
|
#+begin_src emacs-lisp
|
||
|
(set-frame-font "FiraCode 16" nil t)
|
||
|
(set-fontset-font t '(#x1f000 . #x1faff) (font-spec :family "Myne Noto Color Emoji"))
|
||
|
#+end_src
|
||
|
** Themes
|
||
|
#+begin_src emacs-lisp
|
||
|
(use-package afternoon-theme
|
||
|
:ensure t
|
||
|
:config
|
||
|
(load-theme 'afternoon t)
|
||
|
)
|
||
|
(use-package modus-themes
|
||
|
:ensure t
|
||
|
:config
|
||
|
;;(load-theme 'modus-operandi t)
|
||
|
)
|
||
|
#+end_src
|
||
|
** UI
|
||
|
*** Split vertical defaul
|
||
|
#+begin_src emacs-lisp
|
||
|
(setq split-width-threshold nil)
|
||
|
#+end_src
|
||
|
*** Lines Numbers
|
||
|
#+begin_src emacs-lisp
|
||
|
(setq display-line-numbers 'relative)
|
||
|
(global-display-line-numbers-mode)
|
||
|
#+end_src
|
||
|
*** Dashboard
|
||
|
Set up some config functions
|
||
|
|
||
|
Configure layout
|
||
|
#+begin_src emacs-lisp
|
||
|
(defun setup-dashboard-looks ()
|
||
|
"Config ideas https://github.com/emacs-dashboard/emacs-dashboard"
|
||
|
(evil-define-key 'normal 'dashboard-mode-map (kbd "r") 'dashboard-section-1)
|
||
|
(evil-define-key 'normal 'dashboard-mode-map (kbd "J") 'dashboard-next-section)
|
||
|
(evil-define-key 'normal 'dashboard-mode-map (kbd "K") 'dashboard-previous-section)
|
||
|
(setq dashboard-startup-banner "~/.emacs.d/OnePiece.gif")
|
||
|
(setq dashboard-banner-logo-title "Lets get coddiinnngggg")
|
||
|
(setq dashboard-show-shortcuts t)
|
||
|
(setq dashboard-items '((recents . 5)
|
||
|
(projects . 5)))
|
||
|
(setq dashboard-item-names '(("Recent Files:" . "💫 Recent Files, probably not decent:")
|
||
|
("Projects:" . "Projects 🆓, probably also not decent:")))
|
||
|
;; Curently broken ☣️
|
||
|
(setq dashboard-center-content nil)
|
||
|
;;(setq dashboard-set-heading-icons t)
|
||
|
;;(setq dashboard-set-file-icons t)
|
||
|
(setq dashboard-footer-messages '("Sleepyyyyy 🥱"
|
||
|
"Uhhhh I am lost"
|
||
|
"🆓 Just go watch anime 🆓"
|
||
|
"Compiler Error ☣️ Upssss!"
|
||
|
"❤️ Its Coddiinnnng timee"))
|
||
|
)
|
||
|
#+end_src
|
||
|
|
||
|
Evil dashboard setup
|
||
|
#+begin_src emacs-lisp
|
||
|
(defun dashboard-load-function ()
|
||
|
(interactive)
|
||
|
(dashboard-next-section 1))
|
||
|
|
||
|
(defun evil-dashboard-setup ()
|
||
|
(setup-dashboard-looks)
|
||
|
(add-hook 'dashboard-mode-hook 'dashboard-load-function))
|
||
|
#+end_src
|
||
|
|
||
|
#+begin_src emacs-lisp
|
||
|
(use-package dashboard
|
||
|
:ensure t
|
||
|
:after (evil)
|
||
|
:config
|
||
|
(evil-dashboard-setup)
|
||
|
(dashboard-setup-startup-hook))
|
||
|
#+end_src
|
||
|
|
||
|
* Settings
|
||
|
|
||
|
* Evil
|
||
|
** Base Functions
|
||
|
#+begin_src emacs-lisp
|
||
|
(defun my-evil-quit (old-fun &rest args)
|
||
|
(if (eq major-mode 'org-src-mode)
|
||
|
(org-edit-src-exit)
|
||
|
(apply old-fun args)))
|
||
|
|
||
|
(defun my-evil-save (old-fun &rest args)
|
||
|
(if (eq major-mode 'org-src-mode)
|
||
|
(org-edit-src-save)
|
||
|
(apply old-fun args)))
|
||
|
|
||
|
(advice-add #'evil-save :around #'my-evil-save)
|
||
|
(advice-add #'evil-quit :around #'my-evil-quit)
|
||
|
#+end_src
|
||
|
** Base
|
||
|
#+begin_src emacs-lisp
|
||
|
(use-package evil
|
||
|
:ensure
|
||
|
:after (evil-leader)
|
||
|
:config
|
||
|
(evil-mode 1))
|
||
|
#+end_src
|
||
|
** Leader
|
||
|
#+begin_src emacs-lisp
|
||
|
(use-package evil-leader
|
||
|
:ensure t
|
||
|
:config
|
||
|
(global-evil-leader-mode)
|
||
|
; Set leader
|
||
|
(evil-leader/set-leader "<SPC>")
|
||
|
(evil-leader/set-key
|
||
|
"f" 'find-file
|
||
|
"g" 'magit
|
||
|
"cf" (lambda ()(interactive) (find-file (expand-file-name "~/.emacs.d/settings.org"))))
|
||
|
(evil-leader/set-key-for-mode 'org-mode "is" 'org-insert-structure-template)
|
||
|
(evil-leader/set-key-for-mode 'org-mode "e" 'org-edit-src-code)
|
||
|
)
|
||
|
#+end_src
|
||
|
** Org Mode
|
||
|
#+begin_src emacs-lisp
|
||
|
(use-package evil-org
|
||
|
:ensure t
|
||
|
:after (org evil)
|
||
|
:hook (org-mode . evil-org-mode))
|
||
|
#+end_src
|
||
|
|
||
|
* Projects
|
||
|
** Projectile
|
||
|
#+begin_src emacs-lisp
|
||
|
(use-package projectile
|
||
|
:ensure t
|
||
|
:config
|
||
|
(projectile-mode +1)
|
||
|
(define-key projectile-mode-map (kbd "C-p") 'projectile-command-map))
|
||
|
#+end_src
|
||
|
** Magit
|
||
|
#+begin_src emacs-lisp
|
||
|
(use-package magit
|
||
|
:ensure t)
|
||
|
#+end_src
|