Update for some useful changes

This commit is contained in:
William Moore 2024-07-14 02:18:36 -05:00
parent 48f7dae924
commit 54ddb8da28
7 changed files with 115 additions and 96 deletions

4
.gitignore vendored
View File

@ -8,7 +8,7 @@ whomp.d/*.el
org-roam.db org-roam.db
scratch scratch
.emacs.desktop .emacs.desktop
emacs-custom.el custom-*.el
recentf recentf
.cache* .cache*
.lsp* .lsp*
@ -18,4 +18,4 @@ bookmarks*
history* history*
tramp* tramp*
var* var*
snippets/* snippets/*

View File

@ -12,7 +12,7 @@ As it turns out, yeah, he admitted to being wrong. The result of rolling my own
Furthermore, most of the major changes in W.H.O.M.P. are highly experimental and haven't been suggested for T.H.W.A.P. just yet. Enjoy! Furthermore, most of the major changes in W.H.O.M.P. are highly experimental and haven't been suggested for T.H.W.A.P. just yet. Enjoy!
From the original developer of T.H.W.A.P.: From the original developer of T.H.W.A.P.(https://github.com/fuzzy/thwapmacs/):
No doubt I've been helped along that journey by much reading and worthy YouTube Emacs content. And in that spirit I am No doubt I've been helped along that journey by much reading and worthy YouTube Emacs content. And in that spirit I am
publishing this configuration, and endeavoring to ensure that it is well commented and documented. If you have questions, publishing this configuration, and endeavoring to ensure that it is well commented and documented. If you have questions,
@ -25,7 +25,7 @@ Simply clone this repository as your ~/.emacs.d directory and start emacs.
#+BEGIN_SRC #+BEGIN_SRC
$ test -d ~/.emacs.d && mv ~/.emacs.d ~/emacs.d $ test -d ~/.emacs.d && mv ~/.emacs.d ~/emacs.d
$ git clone https://github.com/caranmegil/whompmacs ~/.emacs.d $ git clone https://rezrov.xyz/caranmegil/whompmacs ~/.emacs.d
$ emacs # start up emacs in the normal way and let it bootstrap $ emacs # start up emacs in the normal way and let it bootstrap
#+END_SRC #+END_SRC

View File

@ -39,7 +39,10 @@
(load bootstrap-file nil 'nomessage)) (load bootstrap-file nil 'nomessage))
;; Set up straight.el to use use-package ;; Set up straight.el to use use-package
(straight-use-package 'use-package) ;; (straight-use-package 'use-package)
(use-package use-package
:straight t
:defer t)
(defun whomp/add-key-binding (key command help-text) (defun whomp/add-key-binding (key command help-text)
"Add a key binding to the W.H.O.M.P. keymap" "Add a key binding to the W.H.O.M.P. keymap"

14
init.el
View File

@ -1,3 +1,7 @@
(unless (file-exists-p "~/.emacs.d/custom-init.el")
(shell-command (concat "touch " "~/.emacs.d/custom-init.el")))
(load-file "~/.emacs.d/custom-init.el")
;; custom set stuff ;; custom set stuff
(custom-set-variables (custom-set-variables
;; custom-set-variables was added by Custom. ;; custom-set-variables was added by Custom.
@ -5,13 +9,15 @@
;; Your init file should contain only one such instance. ;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right. ;; If there is more than one, they won't work right.
'(desktop-save-mode t) '(desktop-save-mode t)
'(mouse-autoselect-window t)
'(mouse-drag-and-drop-region t) '(mouse-drag-and-drop-region t)
'(mouse-drag-and-drop-region-cross-program t) '(mouse-drag-and-drop-region-cross-program t)
'(tool-bar-mode nil) '(tool-bar-mode nil)
'(visible-bell 1)) '(visible-bell 1))
(setq custom-file "~/.emacs.d/emacs-custom.el") (setq custom-file "~/.emacs.d/custom-config.el")
(unless (file-exists-p custom-file)
(shell-command (concat "touch " custom-file)))
(load custom-file) (load custom-file)
;; whomp helpers ;; whomp helpers
@ -36,9 +42,11 @@
(require 'whomp-dashboard) (require 'whomp-dashboard)
;; now that everything is loaded, let's load all the user configurations ;; now that everything is loaded, let's load all the user configurations
(let ((user-config (whomp/list-files-with-extension "~/.emacs.d/whomp.d" "el"))) (let ((user-config (whomp/list-files-with-extension "~/.emacs.d/whomp.d" "el")))
(dolist (config user-config) (dolist (config user-config)
(load-file config))) (load-file config)))
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.

View File

@ -51,20 +51,6 @@
;; eval buffer is also very useful ;; eval buffer is also very useful
(whomp/add-key-binding "e b" 'eval-buffer "Eval buffer") (whomp/add-key-binding "e b" 'eval-buffer "Eval buffer")
(straight-use-package 'yasnippet)
(require 'yasnippet)
(setq yas-snippet-dirs '("~/.emacs.d/snippets"))
(message "Yasnippet loaded")
(straight-use-package 'yasnippet-snippets)
(require 'yasnippet-snippets)
(yas-reload-all)
(yas-global-mode 1)
(message "Yasnippet-Snippets loaded")
;; yasnippet stuff
(whomp/add-key-binding "y n" 'yas-new-snippet "Create a new yasnippet")
(message "W.H.O.M.P. Defaults Loaded") (message "W.H.O.M.P. Defaults Loaded")
;; our provide statement ;; our provide statement
(provide 'whomp-defaults) (provide 'whomp-defaults)

View File

@ -36,9 +36,12 @@
(message "Modus themes loaded.")) (message "Modus themes loaded."))
(when (memq 'doomthemes whomp-ui-themes) (when (memq 'doomthemes whomp-ui-themes)
(straight-use-package 'doom-themes) (use-package doom-themes
(require 'doom-themes) :straight t
(message "Doom themes loaded.")) :defer t
:config
(require 'doom-themes)
(message "Doom themes loaded.")))
(when (memq 'sublimethemes whomp-ui-themes) (when (memq 'sublimethemes whomp-ui-themes)
(straight-use-package 'sublime-themes) (straight-use-package 'sublime-themes)

View File

@ -29,80 +29,95 @@
;; base ;; base
(when (memq 'orgmode whomp-orgmode) (when (memq 'orgmode whomp-orgmode)
(straight-use-package 'org) (use-package org
(whomp/ensure-directory-exists "~/org") :straight t
(setq browse-url-browser-function 'browse-url-generic :defer t
browse-url-generic-program "firefox-esr" :config
org-log-done 'time (whomp/ensure-directory-exists "~/org")
org-startup-indented t (setq browse-url-browser-function 'browse-url-generic
org-hide-leading-stars t browse-url-generic-program "firefox-esr"
org-support-shift-select t org-log-done 'time
org-directory "~/org" org-startup-indented t
org-default-notes-file "~/org/index.org" org-hide-leading-stars t
org-export-with-sub-superscripts t org-support-shift-select t
org-export-with-toc t) org-directory "~/org"
(whomp/org-agenda-files-update) org-default-notes-file "~/org/index.org"
(setq org-todo-keywords org-export-with-sub-superscripts t
'((sequence "TODO(t)" "WAITING(w)" "BLOCKED(b)" "|" "IN-PROGRESS(i)") org-export-with-toc t)
(sequence "WONTDO(o)" "DEPRECATED(e)" "STUPID(s)" "|" "DONE(d)"))) (whomp/org-agenda-files-update)
(setq org-capture-templates (setq org-todo-keywords
`(("t" "TODO" entry (file+headline "~/org/agenda/index.org" "Tasks") '((sequence "TODO(t)" "WAITING(w)" "BLOCKED(b)" "|" "IN-PROGRESS(i)")
"* TODO %?\n %a") (sequence "WONTDO(o)" "DEPRECATED(e)" "STUPID(s)" "|" "DONE(d)")))
("l" "TODO" entry (file+headline "~/org/agenda/index.org" "LIFE Tasks") (setq org-capture-templates
"* TODO %?\n %i\n %a") `(("t" "TODO" entry (file+headline "~/org/agenda/index.org" "Tasks")
("a" "Appointment" entry (file+headline "~/org/agenda/events.org" "Appointments") "* TODO %?\n %a")
"* %?\n %i\n %a" :clock-in t :clock-resume t) ("l" "TODO" entry (file+headline "~/org/agenda/index.org" "LIFE Tasks")
("e" "Schedule Event" entry (file+headline "~/org/agenda/events.org" "Events") "* TODO %?\n %i\n %a")
"* %?\n %i\n %a" :clock-in t :clock-resume t) ("a" "Appointment" entry (file+headline "~/org/agenda/events.org" "Appointments")
("m" "Schedule Meeting" entry (file+headline "~/org/agenda/events.org" "Meetings") "* %?\n %i\n %a" :clock-in t :clock-resume t)
"* %?\n %i\n %a" :clock-in t :clock-resume t) ("e" "Schedule Event" entry (file+headline "~/org/agenda/events.org" "Events")
("n" "Note" entry (file "~/org/index.org") "* %?\n %i\n %a" :clock-in t :clock-resume t)
"* %?\n %i\n %a" :clock-in t :clock-resume t) ("m" "Schedule Meeting" entry (file+headline "~/org/agenda/events.org" "Meetings")
("i" "Idea" entry (file "~/org/agenda/ideas.org") "* %?\n %i\n %a" :clock-in t :clock-resume t)
"* %? :IDEA: \n%t" :clock-in t :clock-resume t))) ("n" "Note" entry (file "~/org/index.org")
(org-babel-do-load-languages "* %?\n %i\n %a" :clock-in t :clock-resume t)
'org-babel-load-languages ("i" "Idea" entry (file "~/org/agenda/ideas.org")
'((emacs-lisp . t) "* %? :IDEA: \n%t" :clock-in t :clock-resume t)))
(python . t) (org-babel-do-load-languages
(org . t) 'org-babel-load-languages
(ruby . t) '((emacs-lisp . t)
(shell . t))) (python . t)
(add-hook 'org-mode-hook 'whomp/org-agenda-files-update) (org . t)
(add-hook 'org-mode-hook 'visual-line-mode) (ruby . t)
(shell . t)))
(add-hook 'org-mode-hook 'whomp/org-agenda-files-update)
(add-hook 'org-mode-hook 'visual-line-mode)
;; Org mode stuff ;; Org mode stuff
(whomp/add-key-binding "o l" 'org-store-link "Store a link to the current location in the kill ring.") (whomp/add-key-binding "o l" 'org-store-link "Store a link to the current location in the kill ring.")
(whomp/add-key-binding "o C-l" 'org-toggle-link-display "Toggle the display of links.") (whomp/add-key-binding "o C-l" 'org-toggle-link-display "Toggle the display of links.")
(whomp/add-key-binding "o a" 'org-agenda "Open the Org agenda.") (whomp/add-key-binding "o a" 'org-agenda "Open the Org agenda.")
(whomp/add-key-binding "o n" 'org-capture "Capture a new task.") (whomp/add-key-binding "o n" 'org-capture "Capture a new task.")
(whomp/add-key-binding "o t" 'org-todo-list "Open the Org TODO list.") (whomp/add-key-binding "o t" 'org-todo-list "Open the Org TODO list.")
(whomp/add-key-binding "o c i" 'org-clock-in "Clock in to the current task.") (whomp/add-key-binding "o c i" 'org-clock-in "Clock in to the current task.")
(whomp/add-key-binding "o c o" 'org-clock-out "Clock out of the current task.") (whomp/add-key-binding "o c o" 'org-clock-out "Clock out of the current task.")
(whomp/add-key-binding "o c r" 'org-clock-report "Generate a clock report.") (whomp/add-key-binding "o c r" 'org-clock-report "Generate a clock report.")
(whomp/add-key-binding "o r" 'org-refile "Refile the current task.") (whomp/add-key-binding "o r" 'org-refile "Refile the current task.")
(whomp/add-key-binding "o e" 'org-export-dispatch "Export the current buffer.") (whomp/add-key-binding "o e" 'org-export-dispatch "Export the current buffer.")
(message "org-mode loaded")) (message "org-mode loaded")))
;; org-bullets ;; org-bullets
(when (and (memq 'orgmode whomp-orgmode) (memq 'orgbullets whomp-orgmode)) (when (and (memq 'orgmode whomp-orgmode) (memq 'orgbullets whomp-orgmode))
(straight-use-package 'org-bullets) (use-package org-bullets
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) :straight t
(message "org-bullets loaded")) :defer t
:config
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
(message "org-bullets loaded")))
;; org-super-agenda ;; org-super-agenda
(when (and (memq 'orgmode whomp-orgmode) (memq 'orgsuperagenda whomp-orgmode)) (when (and (memq 'orgmode whomp-orgmode) (memq 'orgsuperagenda whomp-orgmode))
(straight-use-package 'org-super-agenda) (use-package org-super-agenda
(add-hook 'org-agenda-mode-hook 'org-super-agenda-mode) :straight t
(message "org-super-agenda loaded")) :defer t
:config
(add-hook 'org-agenda-mode-hook 'org-super-agenda-mode)
(message "org-super-agenda loaded")))
;; org-modern ;; org-modern
(when (and (memq 'orgmode whomp-orgmode) (memq 'orgmodern whomp-orgmode)) (when (and (memq 'orgmode whomp-orgmode) (memq 'orgmodern whomp-orgmode))
(straight-use-package 'org-modern) (use-package org-modern
(message "org-modern loaded")) :straight t
:defer t
:config
(message "org-modern loaded")))
;; org-timeblock ;; org-timeblock
(when (and (memq 'orgmode whomp-orgmode) (memq 'orgtimeblock whomp-orgmode)) (when (and (memq 'orgmode whomp-orgmode) (memq 'orgtimeblock whomp-orgmode))
(straight-use-package 'org-timeblock) (use-package org-timeblock
(message "org-timeblock loaded")) :straight t
:defer t
:config
(message "org-timeblock loaded")))
;; org-download ;; org-download
(when (and (memq 'orgmode whomp-orgmode) (memq 'orgdownload whomp-orgmode)) (when (and (memq 'orgmode whomp-orgmode) (memq 'orgdownload whomp-orgmode))
@ -111,17 +126,21 @@
;; org-roam ;; org-roam
(when (and (memq 'orgmode whomp-orgmode) (memq 'orgroam whomp-orgmode)) (when (and (memq 'orgmode whomp-orgmode) (memq 'orgroam whomp-orgmode))
(straight-use-package 'org-roam) (use-package org-roam
(org-roam-db-autosync-mode) :straight t
(setq org-roam-v2-ack t) :defer t
(setq org-roam-directory "~/org-roam") :config
(setq org-roam-db-location "~/org-roam/org-roam.db") (org-roam-db-autosync-mode)
(setq org-roam-completion-everywhere t) (setq org-roam-v2-ack t)
(setq org-roam-capture-templates (setq org-roam-directory "~/org-roam")
'(("d" "default" plain "%?" (setq org-roam-db-location "~/org-roam/org-roam.db")
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") (setq org-roam-completion-everywhere t)
:unnarrowed t)))) (setq org-roam-capture-templates
'(("d" "default" plain "%?"
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
:unnarrowed t)))))
;; org-publish
(when (and (memq 'orgmode whomp-orgmode) (memq 'orgpublish whomp-orgmode)) (when (and (memq 'orgmode whomp-orgmode) (memq 'orgpublish whomp-orgmode))
(require 'ox-publish) (require 'ox-publish)
(setq org-publish-project-alist (setq org-publish-project-alist