Add doom-modeline, nerd-icons for dired, completion, etc...

Change some keymaps that didn't need to be hydras into regular keymaps

Misc formatting of module files to be a bit easier to read/understand
This commit is contained in:
Evie Litherland-Smith 2023-10-29 07:00:48 +00:00
parent c70002fb0c
commit 6f04773670
9 changed files with 140 additions and 121 deletions

View file

@ -20,11 +20,13 @@
(global-auto-revert-mode +1)
(delete-selection-mode)
;; define a key to define the word at point.
;; Misc useful keymaps
(keymap-set global-map "M-#" #'dictionary-lookup-definition)
;; define key to open recent files
(keymap-set global-map "C-c r" #'recentf)
(keymap-set global-map "C-c b" #'ibuffer)
(keymap-set global-map "C-c p p" list-packages)
(keymap-set global-map "C-c p i" package-install)
(keymap-set global-map "C-c p d" package-delete)
;; turn on spell checking, if available.
(with-eval-after-load 'ispell
@ -32,17 +34,6 @@
(add-hook 'text-mode-hook #'flyspell-mode)
(add-hook 'prog-mode-hook #'flyspell-prog-mode)))
;; window movement hydra (TODO)
(when (require 'hydra nil :noerror)
(defhydra window (global-map "C-c w")
"Window movement"
("u" winner-undo)
("r" winner-redo)
("n" windmove-down)
("p" windmove-up)
("b" windmove-left)
("f" windmove-right)))
;; Make shebang (#!) file executable when saved
(add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p)

View file

@ -1,10 +1,15 @@
(setq mail-user-agent 'notmuch-user-agent
sendmail-program (executable-find "msmtp")
(setq sendmail-program (executable-find "msmtp")
send-mail-function #'smtpmail-send-it
message-sendmail-f-is-evil t
message-sendmail-extra-arguments '("--read-envelope-from")
message-send-mail-function #'message-send-mail-with-sendmail
message-kill-buffer-on-exit t
message-kill-buffer-on-exit t)
(when (require 'notmuch nil :noerror)
(keymap-set global-map "C-c m m" #'notmuch)
(keymap-set global-map "C-c m c" #'notmuch-mua-new-mail)
(keymap-set global-map "C-c m s" #'notmuch-search)
(setq mail-user-agent 'notmuch-user-agent
notmuch-search-oldest-first nil
notmuch-show-logo nil
notmuch-hello-thousands-separator ","
@ -32,22 +37,13 @@
("u" notmuch-show-mark-read-tags "Mark read")
("f" ("+flagged") "Flag")
("s" ("+spam" "-inbox") "Mark as spam")
("d" ("+deleted" "-inbox" "-unread") "Delete"))
notmuch-indicator-args '((:terms "tag:unread AND tag:inbox" :label "󰮒 "))
("d" ("+deleted" "-inbox" "-unread") "Delete")))
(when (require 'notmuch-indicator nil :noerror)
(setq notmuch-indicator-args '((:terms "tag:unread AND tag:inbox" :label "󰮒 "))
notmuch-indicator-force-refresh-commands '(notmuch-refresh-this-buffer
notmuch-refresh-all-buffers
notmuch-poll-and-refresh-this-buffer))
(when (require 'notmuch nil :noerror)
(require 'notmuch-indicator)
(notmuch-indicator-mode +1)
(when (require 'hydra nil :noerror)
(defhydra email (global-map "C-c m")
"email"
("m" notmuch)
("c" notmuch-mua-new-mail)
("s" notmuch-search)
("i" (notmuch-search "is:inbox"))
("u" (notmuch-search "is:unread AND is:inbox")))))
(notmuch-indicator-mode +1)))
(provide 'custom-email-config)

View file

@ -1,9 +1,8 @@
(when (require 'elfeed nil :noerror)
(let ((elfeed-base-directory "~/.elfeed"))
(setq elfeed-db-directory (expand-file-name "db" elfeed-base-directory)
elfeed-enclosure-default-dir (expand-file-name "enclosures" elfeed-base-directory)
rmh-elfeed-org-files (list (expand-file-name "feeds.org" elfeed-base-directory))))
(when (require 'elfeed nil :noerror)
(add-hook 'elfeed-search-mode-hook #'elfeed-update)
(when (require 'elfeed-org nil :noerror) (elfeed-org))
(when (require 'elfeed-tube nil :noerror) (elfeed-tube-setup)))

View file

@ -1,17 +1,23 @@
(setq direnv-always-show-summary nil
apheleia-remote-algorithm 'local)
(when (require 'aggressive-indent nil :noerror)
(add-hook 'prog-mode-hook #'aggressive-indent-mode))
(when (require 'aggressive-indent nil :noerror) (add-hook 'prog-mode-hook #'aggressive-indent-mode))
(when (require 'rainbow-delimiters nil :noerror)
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode))
(when (require 'rainbow-delimiters nil :noerror) (add-hook 'prog-mode-hook #'rainbow-delimiters-mode))
(when (require 'treesit-aut nil :noerror)
(global-treesit-auto-mode +1))
(when (require 'treesit-aut nil :noerror) (global-treesit-auto-mode +1))
(when (require 'apheleia nil :noerror)
(setq apheleia-remote-algorithm 'local)
(keymap-set global-map "C-c c f" #'apheleia-format-buffer)
(apheleia-global-mode +1))
(when (require 'apheleia nil :noerror) (apheleia-global-mode +1))
(when (require 'eglot nil :noerror)
(eglot-ensure))
(when (require 'eglot nil :noerror) (eglot-ensure))
(when (require 'direnv nil :noerror) (direnv-mode +1))
(when (require 'direnv nil :noerror)
(setq direnv-always-show-summary nil)
(direnv-mode +1))
(when (require 'yasnippet nil :noerror)
(require 'yasnippet-snippets nil :noerror)

View file

@ -1,12 +1,13 @@
(when (require 'emms-setup nil :noerror)
(setq emms-player-list '(emms-player-mpv)
emms-info-functions '(emms-info-native)
emms-source-file-default-directory "~/Music"
emms-lyrics-dir "~/Music/lyrics")
(when (require 'emms-setup nil :noerror)
(emms-all)
(add-hook 'emms-player-started-hook #'emms-show)
(add-hook 'emms-player-paused-hook #'emms-show)
(when (require 'hydra nil :noerror)
(defhydra emms (global-map "C-c e")
"emms"

View file

@ -16,6 +16,13 @@
org-outline-path-complete-in-steps nil
org-default-notes-file (expand-file-name "notes.org" org-directory))
(keymap-set global-map "C-c o a" org-agenda)
(keymap-set global-map "C-c o n" org-capture)
(keymap-set global-map "C-c o c" org-goto-calendar)
(keymap-set global-map "C-c o j j" org-journal-new-entry)
(keymap-set global-map "C-c o j n" org-journal-new-date-entry)
(keymap-set global-map "C-c o j s" org-journal-new-scheduled-entry)
(setq org-capture-templates
'(("n" "Note" entry
(file+headline "notes.org" "Inbox")
@ -39,14 +46,4 @@
:emptry-lines 1)
))
(when (require 'hydra nil :noerror)
(defhydra org (global-map "C-c o")
"Org-Mode"
("a" org-agenda)
("n" org-capture)
("c" org-goto-calendar)
("j j" org-journal-new-entry)
("j n" org-journal-new-date-entry)
("j s" org-journal-new-scheduled-entry)))
(provide 'custom-org-config)

View file

@ -4,7 +4,9 @@
(project-find-file "Find file")
(project-find-regexp "Find regexp")
(project-find-dir "Find directory")
(project-eshell "Eshell"))
magit-clone-default-directory "~/Projects/")
(project-eshell "Eshell")))
(when (require 'magit nil :noerror)
(setq magit-clone-default-directory "~/Projects/"))
(provide 'custom-project-config)

View file

@ -9,7 +9,42 @@
(setq use-dialog-box nil
display-line-numbers 'relative
fill-column 80
fill-column 80)
(defun my/set-frame-alpha () (set-frame-parameter nil 'alpha-background 80))
(tool-bar-mode -1)
(scroll-bar-mode -1)
(add-to-list 'default-frame-alist '(font . "FiraCode Nerd Font-12"))
(global-prettify-symbols-mode +1)
(global-word-wrap-whitespace-mode +1)
(set-frame-parameter nil 'alpha-background 80)
(add-hook 'server-after-make-frame-hook (lambda () (set-frame-parameter nil 'alpha-background 80)))
(when (require 'doom-themes nil :noerror)
(load-theme 'doom-tokyo-night t))
;; Nerd-Icons modes
(when (require 'nerd-icons-dired nil :noerror)
(add-hook 'dired-mode-hook #'nerd-icons-dired-mode))
(when (require 'nerd-icons-ibuffer nil :noerror)
(add-hook 'ibuffer-mode-hook #'nerd-icons-ibuffer-mode))
(when (require 'nerd-icons-completion nil :noerror)
(nerd-icons-completion-mode)
(when (require 'marginalia nil :noerror)
(add-hook 'marginalia-mode-hook #'nerd-icons-completion-marginalia-setup)))
;; Doom-Modeline
(when (require 'doom-modeline nil :noerror)
(setq doom-modeline-icon t)
(display-battery-mode)
(doom-modeline-mode +1))
;; Dashboard
(when (require 'dashboard nil :noerror)
(setq initial-buffer-choice 'dashboard-open
dashboard-icon-type 'nerd-icons
dashboard-set-heading-icons t
dashboard-set-file-icons t
@ -21,8 +56,7 @@
dashboard-projects-show-base t
dashboard-recentf-show-base 'align
dashboard-items '((projects . 5) (agenda . 5) (recents . 5))
dashboard-banner-ascii
(concat " .000000. \n"
dashboard-banner-ascii (concat " .000000. \n"
" .0. .0. \n"
" .00. .00. \n"
" .000cl. .lc000. \n"
@ -35,25 +69,14 @@
" HHHHHH HHHHHHHHH HHHHHHHH \n"
" HHH HHHH HHHHHHHHH HHHH \n"
" HHH HHHHHH \n"
" HHHHH HH \n"))
(defun my/set-frame-alpha () (set-frame-parameter nil 'alpha-background 80))
(tool-bar-mode -1)
(scroll-bar-mode -1)
(add-to-list 'default-frame-alist '(font . "FiraCode Nerd Font-12"))
(global-prettify-symbols-mode +1)
(global-word-wrap-whitespace-mode +1)
(set-frame-parameter nil 'alpha-background 80)
(add-hook 'server-after-make-frame-hook (lambda () (set-frame-parameter nil 'alpha-background 80)))
(when (require 'doom-themes nil :noerror) (load-theme 'doom-tokyo-night t))
;; Dashboard
(when (require 'dashboard nil :noerror) (setq initial-buffer-choice 'dashboard-open))
" HHHHH HH \n")))
;; Extra minor-modes
(when (require 'which-key nil :noerror) (which-key-mode +1))
(when (require 'page-break nil :noerror) (global-page-break-lines-mode +1))
(when (require 'which-key nil :noerror)
(which-key-mode +1))
(when (require 'page-break nil :noerror)
(global-page-break-lines-mode +1))
;;;; Help Buffers

View file

@ -60,8 +60,12 @@
# ui-packages
all-the-icons
nerd-icons
nerd-icons-completion
nerd-icons-dired
nerd-icons-ibuffer
page-break-lines
dashboard
doom-modeline
helpful
which-key
link-hint