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

2
.gitignore vendored
View File

@ -8,7 +8,7 @@ whomp.d/*.el
org-roam.db
scratch
.emacs.desktop
emacs-custom.el
custom-*.el
recentf
.cache*
.lsp*

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!
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
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
$ 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
#+END_SRC

View File

@ -39,7 +39,10 @@
(load bootstrap-file nil 'nomessage))
;; 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)
"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-variables
;; custom-set-variables was added by Custom.
@ -5,13 +9,15 @@
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(desktop-save-mode t)
'(mouse-autoselect-window t)
'(mouse-drag-and-drop-region t)
'(mouse-drag-and-drop-region-cross-program t)
'(tool-bar-mode nil)
'(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)
;; whomp helpers
@ -36,9 +42,11 @@
(require 'whomp-dashboard)
;; 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")))
(dolist (config user-config)
(load-file config)))
(load-file config)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; 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
(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")
;; our provide statement
(provide 'whomp-defaults)

View File

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

View File

@ -29,80 +29,95 @@
;; base
(when (memq 'orgmode whomp-orgmode)
(straight-use-package 'org)
(whomp/ensure-directory-exists "~/org")
(setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program "firefox-esr"
org-log-done 'time
org-startup-indented t
org-hide-leading-stars t
org-support-shift-select t
org-directory "~/org"
org-default-notes-file "~/org/index.org"
org-export-with-sub-superscripts t
org-export-with-toc t)
(whomp/org-agenda-files-update)
(setq org-todo-keywords
'((sequence "TODO(t)" "WAITING(w)" "BLOCKED(b)" "|" "IN-PROGRESS(i)")
(sequence "WONTDO(o)" "DEPRECATED(e)" "STUPID(s)" "|" "DONE(d)")))
(setq org-capture-templates
`(("t" "TODO" entry (file+headline "~/org/agenda/index.org" "Tasks")
"* TODO %?\n %a")
("l" "TODO" entry (file+headline "~/org/agenda/index.org" "LIFE Tasks")
"* TODO %?\n %i\n %a")
("a" "Appointment" entry (file+headline "~/org/agenda/events.org" "Appointments")
"* %?\n %i\n %a" :clock-in t :clock-resume t)
("e" "Schedule Event" entry (file+headline "~/org/agenda/events.org" "Events")
"* %?\n %i\n %a" :clock-in t :clock-resume t)
("m" "Schedule Meeting" entry (file+headline "~/org/agenda/events.org" "Meetings")
"* %?\n %i\n %a" :clock-in t :clock-resume t)
("n" "Note" entry (file "~/org/index.org")
"* %?\n %i\n %a" :clock-in t :clock-resume t)
("i" "Idea" entry (file "~/org/agenda/ideas.org")
"* %? :IDEA: \n%t" :clock-in t :clock-resume t)))
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
(python . t)
(org . t)
(ruby . t)
(shell . t)))
(add-hook 'org-mode-hook 'whomp/org-agenda-files-update)
(add-hook 'org-mode-hook 'visual-line-mode)
(use-package org
:straight t
:defer t
:config
(whomp/ensure-directory-exists "~/org")
(setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program "firefox-esr"
org-log-done 'time
org-startup-indented t
org-hide-leading-stars t
org-support-shift-select t
org-directory "~/org"
org-default-notes-file "~/org/index.org"
org-export-with-sub-superscripts t
org-export-with-toc t)
(whomp/org-agenda-files-update)
(setq org-todo-keywords
'((sequence "TODO(t)" "WAITING(w)" "BLOCKED(b)" "|" "IN-PROGRESS(i)")
(sequence "WONTDO(o)" "DEPRECATED(e)" "STUPID(s)" "|" "DONE(d)")))
(setq org-capture-templates
`(("t" "TODO" entry (file+headline "~/org/agenda/index.org" "Tasks")
"* TODO %?\n %a")
("l" "TODO" entry (file+headline "~/org/agenda/index.org" "LIFE Tasks")
"* TODO %?\n %i\n %a")
("a" "Appointment" entry (file+headline "~/org/agenda/events.org" "Appointments")
"* %?\n %i\n %a" :clock-in t :clock-resume t)
("e" "Schedule Event" entry (file+headline "~/org/agenda/events.org" "Events")
"* %?\n %i\n %a" :clock-in t :clock-resume t)
("m" "Schedule Meeting" entry (file+headline "~/org/agenda/events.org" "Meetings")
"* %?\n %i\n %a" :clock-in t :clock-resume t)
("n" "Note" entry (file "~/org/index.org")
"* %?\n %i\n %a" :clock-in t :clock-resume t)
("i" "Idea" entry (file "~/org/agenda/ideas.org")
"* %? :IDEA: \n%t" :clock-in t :clock-resume t)))
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
(python . t)
(org . t)
(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
(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 a" 'org-agenda "Open the Org agenda.")
(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 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 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 e" 'org-export-dispatch "Export the current buffer.")
(message "org-mode loaded"))
(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 a" 'org-agenda "Open the Org agenda.")
(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 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 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 e" 'org-export-dispatch "Export the current buffer.")
(message "org-mode loaded")))
;; org-bullets
(when (and (memq 'orgmode whomp-orgmode) (memq 'orgbullets whomp-orgmode))
(straight-use-package 'org-bullets)
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
(message "org-bullets loaded"))
(use-package org-bullets
:straight t
:defer t
:config
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
(message "org-bullets loaded")))
;; org-super-agenda
(when (and (memq 'orgmode whomp-orgmode) (memq 'orgsuperagenda whomp-orgmode))
(straight-use-package 'org-super-agenda)
(add-hook 'org-agenda-mode-hook 'org-super-agenda-mode)
(message "org-super-agenda loaded"))
(use-package org-super-agenda
:straight t
:defer t
:config
(add-hook 'org-agenda-mode-hook 'org-super-agenda-mode)
(message "org-super-agenda loaded")))
;; org-modern
(when (and (memq 'orgmode whomp-orgmode) (memq 'orgmodern whomp-orgmode))
(straight-use-package 'org-modern)
(message "org-modern loaded"))
(use-package org-modern
:straight t
:defer t
:config
(message "org-modern loaded")))
;; org-timeblock
(when (and (memq 'orgmode whomp-orgmode) (memq 'orgtimeblock whomp-orgmode))
(straight-use-package 'org-timeblock)
(message "org-timeblock loaded"))
(use-package org-timeblock
:straight t
:defer t
:config
(message "org-timeblock loaded")))
;; org-download
(when (and (memq 'orgmode whomp-orgmode) (memq 'orgdownload whomp-orgmode))
@ -111,17 +126,21 @@
;; org-roam
(when (and (memq 'orgmode whomp-orgmode) (memq 'orgroam whomp-orgmode))
(straight-use-package 'org-roam)
(org-roam-db-autosync-mode)
(setq org-roam-v2-ack t)
(setq org-roam-directory "~/org-roam")
(setq org-roam-db-location "~/org-roam/org-roam.db")
(setq org-roam-completion-everywhere 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))))
(use-package org-roam
:straight t
:defer t
:config
(org-roam-db-autosync-mode)
(setq org-roam-v2-ack t)
(setq org-roam-directory "~/org-roam")
(setq org-roam-db-location "~/org-roam/org-roam.db")
(setq org-roam-completion-everywhere 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))
(require 'ox-publish)
(setq org-publish-project-alist