Update a buncha changes

This commit is contained in:
William Moore 2024-07-12 18:32:01 -05:00
parent a9769e9919
commit f3af698787
16 changed files with 273 additions and 229 deletions

3
.gitignore vendored
View File

@ -2,11 +2,13 @@
*.elc *.elc
elpa/ elpa/
melpa/ melpa/
whomp.d/*.el
*.lock *.lock
.org-id-locations .org-id-locations
org-roam.db org-roam.db
scratch scratch
.emacs.desktop .emacs.desktop
emacs-custom.el
recentf recentf
.cache* .cache*
.lsp* .lsp*
@ -16,3 +18,4 @@ bookmarks*
history* history*
tramp* tramp*
var* var*
snippets/*

View File

@ -3,10 +3,10 @@
;; ;;
;; Add the lib directory to the load path ;; Add the lib directory to the load path
(add-to-list 'load-path (expand-file-name "thwap" user-emacs-directory)) (add-to-list 'load-path (expand-file-name "whomp" user-emacs-directory))
;; Add the thwap.d directory to the load path ;; Add the thwap.d directory to the load path
(add-to-list 'load-path (expand-file-name "thwap.d" user-emacs-directory)) (add-to-list 'load-path (expand-file-name "whomp.d" user-emacs-directory))
;; ;;
@ -41,7 +41,7 @@
;; 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)
(defun thwap/add-key-binding (key command help-text) (defun whomp/add-key-binding (key command help-text)
"Add a key binding to the T.H.W.A.P. keymap" "Add a key binding to the W.H.O.M.P. keymap"
(define-key thwap-map (kbd key) command) (define-key whomp-map (kbd key) command)
(add-to-list 'thwap-help-lines (format "%-12s: %s" (concat "C-c t " key) help-text))) (add-to-list 'whomp-help-lines (format "%-12s: %s" (concat "C-c w " key) help-text)))

38
init.el
View File

@ -8,40 +8,42 @@
'(mouse-autoselect-window 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)
'(thwap-development '(magitmode projectilemode pythonmode elpymode yamlmode))
'(thwap-orgmode '(orgmode orgdownload orgroam orgpublish))
'(thwap-ui-theme nil)
'(tool-bar-mode nil) '(tool-bar-mode nil)
'(visible-bell 1)) '(visible-bell 1))
(setq custom-file "~/.emacs.d/emacs-custom.el")
(load custom-file)
;;(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.
;; 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.
;; '(default ((t (:family "Noto Sans Mono" :foundry "GOOG" :slant normal :weight regular :height 90 :width normal))))) '(default ((t (:family "Noto Sans Mono" :foundry "GOOG" :slant normal :weight regular :height 90 :width normal))))
;; thwap helpers ;; whomp helpers
(require 'thwap-helpers) (require 'whomp-helpers)
;; thwap config ;; whomp config
(require 'thwap-configuration) (require 'whomp-configuration)
;; thwap defaults ;; whomp defaults
(require 'thwap-defaults) (require 'whomp-defaults)
;; theme configuration ;; theme configuration
(require 'thwap-interface) (require 'whomp-interface)
;; file browser configuration ;; file browser configuration
(require 'thwap-file-browser) (require 'whomp-file-browser)
;; company configuration ;; company configuration
(require 'thwap-completion) (require 'whomp-completion)
;; development configuration ;; development configuration
(require 'thwap-development) (require 'whomp-development)
;; extended development configuration
(require 'whomp-dev-ext)
;; org configuration ;; org configuration
(require 'thwap-orgmode) (require 'whomp-orgmode)
;; dashboard ;; dashboard
(require 'thwap-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 (thwap/list-files-with-extension "~/.emacs.d/thwap.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

View File

@ -1,12 +0,0 @@
;;
;; Define the custom variables for the T.H.W.A.P. Emacs configuration.
;;
;; define the group
(defgroup thwap-config nil
"T.H.W.A.P. Emacs configuration group."
:group 'convenience
:prefix "thwap-")
(message "T.H.W.A.P. Loaded thwap-config group.")
(provide 'thwap-configuration)

View File

@ -1,70 +0,0 @@
;;
;; Set some defaults
;;
;; automatically revert buffers when they change on disk
;; (global-auto-revert-mode f)
;; display line numbers, TODO make this a config option for line number style
;; (global-display-line-numbers-mode 1)
;; set our default warning level to error
(setq warning-minimum-level :error)
;; set the default tab width to 2 spaces
(setq-default tab-width 2)
(setq tab-width 2)
(setq indent-tabs-mode 1)
;; Set the default help lines
(setq thwap-help-lines '("--------------"
"All T.H.W.A.P. commands will start with 'C-c t'"
""
"Welcome to the T.H.W.A.P. Emacs Dashboard"))
;;
;; Golden Ratio Mode helps with window sizing, and is a default feature
;;
;; golden-ratio
;; (straight-use-package 'golden-ratio)
;; (golden-ratio-mode 1)
;; (setq golden-ratio-auto-scale t)
;; (message "Golden Ratio Mode Enabled")
;;
;; Set up the T.H.W.A.P. keybindings
;;
;; The T.H.W.A.P. Map
;; This is the base starting point for the T.H.W.A.P. keybindings
(define-prefix-command 'thwap-map)
(global-set-key (kbd "C-c t") 'thwap-map)
;; Add a command to customize the T.H.W.A.P. group
(thwap/add-key-binding
"C-c"
(lambda () (interactive) (customize-group 'thwap-config))
"Customize this T.H.W.A.P. Emacs Installation")
;; quick commenting/uncommenting of a region is just too useful
(thwap/add-key-binding "c" 'comment-or-uncomment-region "Comment or uncomment region")
;; eval buffer is also very useful
(thwap/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
(thwap/add-key-binding "y n" 'yas-new-snippet "Create a new yasnippet")
(message "T.H.W.A.P. Defaults Loaded")
;; our provide statement
(provide 'thwap-defaults)

View File

@ -4,23 +4,23 @@
;; ;;
;; company toggle ;; company toggle
(defcustom thwap-completion nil (defcustom whomp-completion nil
"Choose the completion framework to use." "Choose the completion framework to use."
:type '(choice (const :tag "None" nil) :type '(choice (const :tag "None" nil)
(const :tag "company" companycomp) (const :tag "company" companycomp)
(const :tag "helm" helmcomp) (const :tag "helm" helmcomp)
(const :tag "ivy" ivycomp)) (const :tag "ivy" ivycomp))
:group 'thwap-config) :group 'whomp-config)
;; Company and auto-complete configuration ;; Company and auto-complete configuration
(when (and (eq 'companycomp thwap-completion) (not (eq 'helmcomp thwap-completion)) (not (eq 'ivycomp thwap-completion))) (when (and (eq 'companycomp whomp-completion) (not (eq 'helmcomp whomp-completion)) (not (eq 'ivycomp whomp-completion)))
(straight-use-package 'company) (straight-use-package 'company)
(add-hook 'after-init-hook 'global-company-mode) (add-hook 'after-init-hook 'global-company-mode)
(message "Company completion enabled.")) (message "Company completion enabled."))
;; If ivy is enabled, install and configure it ;; If ivy is enabled, install and configure it
(when (and (eq 'ivycomp thwap-completion) (not (eq 'companycomp thwap-completion)) (not (eq 'helmcomp thwap-completion))) (when (and (eq 'ivycomp whomp-completion) (not (eq 'companycomp whomp-completion)) (not (eq 'helmcomp whomp-completion)))
(straight-use-package 'ivy) (straight-use-package 'ivy)
(ivy-mode 1) (ivy-mode 1)
(setq ivy-use-virtual-buffers t) (setq ivy-use-virtual-buffers t)
@ -28,28 +28,28 @@
(message "Ivy completion enabled.")) (message "Ivy completion enabled."))
;; If helm is enabled, install and configure it ;; If helm is enabled, install and configure it
(when (and (eq 'helmcomp thwap-completion) (not (eq 'companycomp thwap-completion)) (not (eq 'ivycomp thwap-completion))) (when (and (eq 'helmcomp whomp-completion) (not (eq 'companycomp whomp-completion)) (not (eq 'ivycomp whomp-completion)))
(straight-use-package 'helm) (straight-use-package 'helm)
(helm-mode 1) (helm-mode 1)
(message "Helm completion enabled.")) (message "Helm completion enabled."))
;; If all are enabled, choose company ;; If all are enabled, choose company
(when (or (and (eq 'companycomp thwap-completion) (eq 'helmcomp thwap-completion) (eq 'ivycomp thwap-completion)) (when (or (and (eq 'companycomp whomp-completion) (eq 'helmcomp whomp-completion) (eq 'ivycomp whomp-completion))
(and (eq 'companycomp thwap-completion) (eq 'helmcomp thwap-completion) (not (eq 'ivycomp thwap-completion))) (and (eq 'companycomp whomp-completion) (eq 'helmcomp whomp-completion) (not (eq 'ivycomp whomp-completion)))
(and (eq 'companycomp thwap-completion) (eq 'ivycomp thwap-completion) (not (eq 'helmcomp thwap-completion)))) (and (eq 'companycomp whomp-completion) (eq 'ivycomp whomp-completion) (not (eq 'helmcomp whomp-completion))))
(straight-use-package 'company) (straight-use-package 'company)
(add-hook 'after-init-hook 'global-company-mode) (add-hook 'after-init-hook 'global-company-mode)
(message "There can be only one. Company completion picked.")) (message "There can be only one. Company completion picked."))
;; if helm and ivy are enabled, choose ivy ;; if helm and ivy are enabled, choose ivy
(when (and (eq 'helmcomp thwap-completion) (eq 'ivycomp thwap-completion) (not (eq 'companycomp thwap-completion))) (when (and (eq 'helmcomp whomp-completion) (eq 'ivycomp whomp-completion) (not (eq 'companycomp whomp-completion)))
(straight-use-package 'ivy) (straight-use-package 'ivy)
(ivy-mode 1) (ivy-mode 1)
(setq ivy-use-virtual-buffers t) (setq ivy-use-virtual-buffers t)
(setq enable-recursive-minibuffers t) (setq enable-recursive-minibuffers t)
(message "There can be only one. Ivy completion picked.")) (message "There can be only one. Ivy completion picked."))
(message "T.H.W.A.P. Completion configuration complete.") (message "W.H.O.M.P. Completion configuration complete.")
(provide 'thwap-completion) (provide 'whomp-completion)

View File

@ -0,0 +1,12 @@
;;
;; Define the custom variables for the W.H.O.M.P. Emacs configuration.
;;
;; define the group
(defgroup whomp-config nil
"W.H.O.M.P. Emacs configuration group."
:group 'convenience
:prefix "whomp-")
(message "W.H.O.M.P. Loaded whomp-config group.")
(provide 'whomp-configuration)

View File

@ -1,9 +1,9 @@
(straight-use-package 'dashboard) (straight-use-package 'dashboard)
(dashboard-setup-startup-hook) (dashboard-setup-startup-hook)
(setq dashboard-banner-logo-title (thwap/dashboard-build-logo-title thwap-help-lines)) (setq dashboard-banner-logo-title (whomp/dashboard-build-logo-title whomp-help-lines))
;; "Welcome to the T.H.W.A.P. Emacs Dashboard") ;; "Welcome to the W.H.O.M.P. Emacs Dashboard")
(setq dashboard-startup-banner (thwap/random-string-from-list (thwap/list-files-with-extension "~/.emacs.d/logos" "png"))) (setq dashboard-startup-banner (whomp/random-string-from-list (whomp/list-files-with-extension "~/.emacs.d/logos" "png")))
(setq initial-buffer-choice (lambda () (get-buffer-create dashboard-buffer-name))) (setq initial-buffer-choice (lambda () (get-buffer-create dashboard-buffer-name)))
(setq dashboard-center-content t) (setq dashboard-center-content t)
(setq dashboard-vertically-center-content t) (setq dashboard-vertically-center-content t)
@ -21,6 +21,6 @@
dashboard-insert-newline dashboard-insert-newline
dashboard-insert-footer)) dashboard-insert-footer))
(message "T.H.W.A.P. Dashboard loaded") (message "W.H.O.M.P. Dashboard loaded")
(provide 'thwap-dashboard) (provide 'whomp-dashboard)
;;; thwap-dashboard.el ends here ;;; whomp-dashboard.el ends here

70
whomp/whomp-defaults.el Normal file
View File

@ -0,0 +1,70 @@
;;
;; Set some defaults
;;
;; automatically revert buffers when they change on disk
(global-auto-revert-mode t)
;; display line numbers, TODO make this a config option for line number style
(global-display-line-numbers-mode 1)
;; set our default warning level to error
(setq warning-minimum-level :error)
;; set the default tab width to 2 spaces
(setq-default tab-width 2)
(setq tab-width 2)
(setq indent-tabs-mode 1)
;; Set the default help lines
(setq whomp-help-lines '("--------------"
"All W.H.O.M.P. commands will start with 'C-c w'"
""
"Welcome to the W.H.O.M.P. Emacs Dashboard"))
;;
;; Golden Ratio Mode helps with window sizing, and is a default feature
;;
;; golden-ratio
(straight-use-package 'golden-ratio)
(golden-ratio-mode 1)
(setq golden-ratio-auto-scale t)
(message "Golden Ratio Mode Enabled")
;;
;; Set up the W.H.O.M.P. keybindings
;;
;; The W.H.O.M.P. Map
;; This is the base starting point for the W.H.O.M.P. keybindings
(define-prefix-command 'whomp-map)
(global-set-key (kbd "C-c w") 'whomp-map)
;; Add a command to customize the W.H.O.M.P. group
(whomp/add-key-binding
"C-c"
(lambda () (interactive) (customize-group 'whomp-config))
"Customize this W.H.O.M.P. Emacs Installation")
;; quick commenting/uncommenting of a region is just too useful
(whomp/add-key-binding "c" 'comment-or-uncomment-region "Comment or uncomment region")
;; 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)

50
whomp/whomp-dev-ext.el Normal file
View File

@ -0,0 +1,50 @@
;;
;; Extended development assistance packages
;; These are the packages uncommon to most developers but are
;; necessary to those they're necessary!
;;
(defcustom whomp-dev-ext nil
"Whether or not to enable extended development assistance packages."
:type '(set (const :tag "None" nil)
(const :tag "copilot" copilotmode) ;; code completion
(const :tag "terraform" terraformmode) ;; terraform language support
)
:group 'whomp-config)
;; terraform-mode
(when (memq 'terraformmode whomp-dev-ext)
(use-package terraform-mode
:straight t
:defer t)
(when (eq 'company whomp-completion)
(use-package company-terraform
:straight t
:defer t
:config
(add-hook 'terraform-mode-hook #'company-terraform-init))
(add-hook 'terraform-mode-hook #'terraform-format-on-save-mode)
(add-hook 'terraform-mode-hook #'terraform-format-on-save-mode))
(message "terraform-mode loaded"))
(when (memq 'copilotmode whomp-development)
(use-package dash
:straight t
:defer t)
(use-package editorconfig
:straight t
:defer t)
(use-package copilot
:straight (:host github :repo "zerolfx/copilot.el" :files ("dist" "*.el"))
:defer t
:ensure t
:config
;; you can utilize :map :hook and :config to customize copilot
(add-hook 'prog-mode-hook 'copilot-mode)
(define-key copilot-completion-map (kbd "<tab>") 'copilot-accept-completion)
(define-key copilot-completion-map (kbd "TAB") 'copilot-accept-completion))
(message "copilot loaded"))
(message "W.H.O.M.P. extended development assistance packages loaded")
(provide 'whomp-dev-ext)
;; whomp-dev-ext.el ends here

View File

@ -4,7 +4,7 @@
;; ;;
;; dev layer toggles ;; dev layer toggles
(defcustom thwap-development nil (defcustom whomp-development nil
"Whether or not to enable development assistance packages." "Whether or not to enable development assistance packages."
:type '(set (const :tag "None" nil) :type '(set (const :tag "None" nil)
(const :tag "lsp" lspmode) ;; generally required for other modes (const :tag "lsp" lspmode) ;; generally required for other modes
@ -14,41 +14,41 @@
(const :tag "python" pythonmode) ;; python language support (const :tag "python" pythonmode) ;; python language support
(const :tag "elpy" elpymode) ;; python language support (elpy) (const :tag "elpy" elpymode) ;; python language support (elpy)
(const :tag "yaml" yamlmode)) ;; yaml language support (const :tag "yaml" yamlmode)) ;; yaml language support
:group 'thwap-config) :group 'whomp-config)
;; lsp-mode ;; lsp-mode
(when (memq 'lspmode thwap-development) (when (memq 'lspmode whomp-development)
(straight-use-package 'lsp-mode) (straight-use-package 'lsp-mode)
(straight-use-package 'lsp-ui) (straight-use-package 'lsp-ui)
(when (eq 'treemacs thwap-dirbrowser) (when (eq 'treemacs whomp-dirbrowser)
(straight-use-package 'lsp-treemacs)) (straight-use-package 'lsp-treemacs))
(setq gc-cons-threshold 100000000) (setq gc-cons-threshold 100000000)
(setq read-process-output-max (* 1024 1024)) (setq read-process-output-max (* 1024 1024))
(thwap/add-key-binding "l" 'lsp-keymap-prefix "lsp-keymap-prefix") (whomp/add-key-binding "l" 'lsp-keymap-prefix "lsp-keymap-prefix")
(straight-use-package 'eglot) (straight-use-package 'eglot)
(require 'eglot) (require 'eglot)
(message "lsp-mode loaded")) (message "lsp-mode loaded"))
;; magit ;; magit
(when (memq 'magitmode thwap-development) (when (memq 'magitmode whomp-development)
(straight-use-package 'magit) (straight-use-package 'magit)
(straight-use-package 'forge) (straight-use-package 'forge)
(straight-use-package 'magit-todos) (straight-use-package 'magit-todos)
(thwap/add-key-binding "g s" 'magit-status "Git status (magit entrypoint)") (whomp/add-key-binding "g s" 'magit-status "Git status (magit entrypoint)")
(thwap/add-key-binding "g l" 'magit-log "Git log (magit entrypoint") (whomp/add-key-binding "g l" 'magit-log "Git log (magit entrypoint")
(thwap/add-key-binding "g b" 'magit-blame "Git blame (magit entrypoint") (whomp/add-key-binding "g b" 'magit-blame "Git blame (magit entrypoint")
(thwap/add-key-binding "g f" 'magit-find-file "Git find file (magit entrypoint") (whomp/add-key-binding "g f" 'magit-find-file "Git find file (magit entrypoint")
(message "magit loaded")) (message "magit loaded"))
;; projectile ;; projectile
(when (memq 'projectilemode thwap-development) (when (memq 'projectilemode whomp-development)
(straight-use-package 'projectile) (straight-use-package 'projectile)
(thwap/add-key-binding "p" 'projectile-command-map "Projectile commands") (whomp/add-key-binding "p" 'projectile-command-map "Projectile commands")
(message "projectile loaded")) (message "projectile loaded"))
;; go-mode ;; go-mode
(when (memq 'gomode thwap-development) (when (memq 'gomode whomp-development)
(straight-use-package 'go-mode) (straight-use-package 'go-mode)
(straight-use-package 'go-eldoc) (straight-use-package 'go-eldoc)
(straight-use-package 'go-projectile) (straight-use-package 'go-projectile)
@ -64,11 +64,11 @@
(message "go-mode loaded")) (message "go-mode loaded"))
;; python-mode ;; python-mode
(when (memq 'pythonmode thwap-development) (when (memq 'pythonmode whomp-development)
(when (memq 'elpymode thwap-development) (when (memq 'elpymode whomp-development)
(straight-use-package 'elpy) (straight-use-package 'elpy)
(elpy-enable)) (elpy-enable))
(when (not (memq 'elpymode thwap-development)) (when (not (memq 'elpymode whomp-development))
(add-hook 'python-mode-hook (lambda () (add-hook 'python-mode-hook (lambda ()
(setq-local tab-width 2))) (setq-local tab-width 2)))
(add-hook 'python-mode-hook #'lsp-deferred)) (add-hook 'python-mode-hook #'lsp-deferred))
@ -82,7 +82,7 @@
(message "python-mode loaded")) (message "python-mode loaded"))
;; yaml-mode ;; yaml-mode
(when (memq 'yamlmode thwap-development) (when (memq 'yamlmode whomp-development)
(straight-use-package 'yaml-mode) (straight-use-package 'yaml-mode)
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode)) (add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))
(add-to-list 'auto-mode-alist '("\\.yaml\\'" . yaml-mode)) (add-to-list 'auto-mode-alist '("\\.yaml\\'" . yaml-mode))
@ -95,6 +95,6 @@
(message "yaml-mode loaded")) (message "yaml-mode loaded"))
(message "T.H.W.A.P. development assistance packages loaded") (message "W.H.O.M.P. development assistance packages loaded")
(provide 'thwap-development) (provide 'whomp-development)
;; thwap-development.el ends here ;; whomp-development.el ends here

View File

@ -3,28 +3,28 @@
;; Tree browser packages ;; Tree browser packages
;; ;;
(defcustom thwap-dirbrowser nil (defcustom whomp-dirbrowser nil
"Whether or not to enable treemacs." "Whether or not to enable treemacs."
:type '(choice (const :tag "None" nil) :type '(choice (const :tag "None" nil)
(const :tag "neotree" neotree) (const :tag "neotree" neotree)
(const :tag "treemacs" treemacs)) (const :tag "treemacs" treemacs))
:group 'thwap-config) :group 'whomp-config)
;; ;;
;; File Tree Browser ;; File Tree Browser
;; ;;
(when (eq 'neotree thwap-dirbrowser) (when (eq 'neotree whomp-dirbrowser)
(use-package neotree (use-package neotree
:straight t :straight t
:config :config
(global-set-key [f8] 'neotree-toggle) (global-set-key [f8] 'neotree-toggle)
(thwap/add-key-binding "C-n" 'neotree-toggle "Toggle Neotree")) (whomp/add-key-binding "C-n" 'neotree-toggle "Toggle Neotree"))
(message "neotree loaded")) (message "neotree loaded"))
(when (eq 'treemacs thwap-dirbrowser) (when (eq 'treemacs whomp-dirbrowser)
(use-package treemacs (use-package treemacs
:straight t :straight t
:ensure t :ensure t
@ -44,10 +44,10 @@
treemacs-never-persist nil treemacs-never-persist nil
treemacs-is-never-other-window t treemacs-is-never-other-window t
treemacs-goto-tag-strategy 'refetch-index))) treemacs-goto-tag-strategy 'refetch-index)))
(thwap/add-key-binding "C-t" 'treemacs "Toggle Treemacs") (whomp/add-key-binding "C-t" 'treemacs "Toggle Treemacs")
(when (memq 'kaolinthemes thwap-ui-themes) (when (memq 'kaolinthemes whomp-ui-themes)
(kaolin-treemacs-theme)) (kaolin-treemacs-theme))
(message "treemacs loaded")) (message "treemacs loaded"))
(message "T.H.W.A.P. Directory browser configuration loaded.") (message "W.H.O.M.P. Directory browser configuration loaded.")
(provide 'thwap-file-browser) (provide 'whomp-file-browser)

View File

@ -2,7 +2,7 @@
;; Helper functions for the dashboard ;; Helper functions for the dashboard
;; ;;
(defun thwap/dashboard-insert-logo-title (banner) (defun whomp/dashboard-insert-logo-title (banner)
"Insert BANNER into the dashboard buffer. "Insert BANNER into the dashboard buffer.
BANNER can be a single string, which will be centered, or a list of strings, BANNER can be a single string, which will be centered, or a list of strings,
which will be displayed with line breaks between them." which will be displayed with line breaks between them."
@ -15,12 +15,12 @@ which will be displayed with line breaks between them."
(insert (propertize line 'face 'dashboard-banner-logo-title)) (insert (propertize line 'face 'dashboard-banner-logo-title))
(insert "\n")))) (insert "\n"))))
(defun thwap/dashboard-build-logo-title (lst) (defun whomp/dashboard-build-logo-title (lst)
"Build a list of strings from LST to display as the banner. "Build a list of strings from LST to display as the banner.
LST is reversed and concatenated into a single string with line breaks." LST is reversed and concatenated into a single string with line breaks."
(mapconcat 'identity (reverse lst) "\n")) (mapconcat 'identity (reverse lst) "\n"))
(defun thwap/random-string-from-list (strings) (defun whomp/random-string-from-list (strings)
"Return a random string from STRINGS." "Return a random string from STRINGS."
(let ((index (random (length strings)))) (let ((index (random (length strings))))
(nth index strings))) (nth index strings)))
@ -30,14 +30,14 @@ LST is reversed and concatenated into a single string with line breaks."
;; ;;
;; Function to create a directory if it doesn't exist ;; Function to create a directory if it doesn't exist
(defun thwap/ensure-directory-exists (dir) (defun whomp/ensure-directory-exists (dir)
"Ensure the directory DIR exists. If not, create it." "Ensure the directory DIR exists. If not, create it."
(unless (file-directory-p dir) (unless (file-directory-p dir)
(message "Creating missing directory: %s" dir) (message "Creating missing directory: %s" dir)
(make-directory dir t))) (make-directory dir t)))
;; Function to list all files in a directory with a given extension ;; Function to list all files in a directory with a given extension
(defun thwap/list-files-with-extension (dir extension) (defun whomp/list-files-with-extension (dir extension)
"Recursively list all files in DIR with the given EXTENSION, suitable for org-agenda-files." "Recursively list all files in DIR with the given EXTENSION, suitable for org-agenda-files."
(let ((files '())) (let ((files '()))
(dolist (file (directory-files-recursively dir (concat "\\." extension "\\'"))) (dolist (file (directory-files-recursively dir (concat "\\." extension "\\'")))
@ -49,23 +49,23 @@ LST is reversed and concatenated into a single string with line breaks."
;; ;;
;; Function to get a unique filename for Org-capture ;; Function to get a unique filename for Org-capture
(defun thwap/org-capture-get-unique-filename () (defun whomp/org-capture-get-unique-filename ()
"Generate a unique filename for Org-capture." "Generate a unique filename for Org-capture."
(let ((filename (format "~/.org-agenda/syncup__issue__%s.org" (format-time-string "%Y%m%d%H%M%S")))) (let ((filename (format "~/.org-agenda/syncup__issue__%s.org" (format-time-string "%Y%m%d%H%M%S"))))
(message "Inside function: Generated filename: %s" filename) (message "Inside function: Generated filename: %s" filename)
filename)) filename))
;; Function to update org-agenda-files ;; Function to update org-agenda-files
(defun thwap/org-agenda-files-update () (defun whomp/org-agenda-files-update ()
"Update the `org-agenda-files` variable. "Update the `org-agenda-files` variable.
This function sets `org-agenda-files` and `org-timeblock-files` to the list of This function sets `org-agenda-files` and `org-timeblock-files` to the list of
all `.org` files in the `~/.org-agenda` directory, and sets all `.org` files in the `~/.org-agenda` directory, and sets
`org-timeblock-inbox-file` to `~/org/agenda/index.org`." `org-timeblock-inbox-file` to `~/org/agenda/index.org`."
(setq org-agenda-files (thwap/list-files-with-extension "~/org/agenda" "org")) (setq org-agenda-files (whomp/list-files-with-extension "~/org/agenda" "org"))
(setq org-timeblock-files (thwap/list-files-with-extension "~/org/agenda" "org")) (setq org-timeblock-files (whomp/list-files-with-extension "~/org/agenda" "org"))
(setq org-timeblock-inbox-file "~/org/agenda/index.org")) (setq org-timeblock-inbox-file "~/org/agenda/index.org"))
(message "T.H.W.A.P. Loaded helper function library.") (message "W.H.O.M.P. Loaded helper function library.")
(provide 'thwap-helpers) (provide 'whomp-helpers)
;;; thwap-helpers.el ends here ;;; whomp-helpers.el ends here

View File

@ -4,72 +4,67 @@
;; ;;
;; modus themes toggle ;; modus themes toggle
(defcustom thwap-ui-themes nil (defcustom whomp-ui-themes nil
"Choose the themes to install." "Choose the themes to install."
:type '(set (const :tag "Modus themes" modusthemes) :type '(set (const :tag "Modus themes" modusthemes)
(const :tag "Doom themes" doomthemes) (const :tag "Doom themes" doomthemes)
(const :tag "Sublime themes" sublimethemes) (const :tag "Sublime themes" sublimethemes)
(const :tag "Kaolin themes" kaolinthemes) (const :tag "Kaolin themes" kaolinthemes)
(const :tag "Alect themes" alectthemes) (const :tag "Alect themes" alectthemes)
(const :tag "Wombat themes" wombat)) (const :tag "Wombat themes" wombatthemes))
:group 'thwap-config) :group 'whomp-config)
;; theme to load ;; theme to load
(defcustom thwap-ui-theme nil (defcustom whomp-ui-theme nil
"Name of the theme to load." "Name of the theme to load."
:type 'string :group 'whomp-config)
:group 'thwap-config)
;; all-the-icons toggle ;; all-the-icons toggle
(defcustom thwap-ui-icons nil (defcustom whomp-ui-icons nil
"Choose the icon sets to install." "Choose the icon sets to install."
:type '(choice (const :tag "None" nil) :type '(choice (const :tag "None" nil)
(const :tag "All-the-icons" alltheicons) (const :tag "All-the-icons" alltheicons)
(const :tag "Nerd-icons" nerdicons)) (const :tag "Nerd-icons" nerdicons))
:group 'thwap-config) :group 'whomp-config)
; theme bits ;; theme bits
(when (memq 'modusthemes thwap-ui-themes) (when (memq 'modusthemes whomp-ui-themes)
(straight-use-package 'modus-themes) (straight-use-package 'modus-themes)
(require 'modus-themes) (require 'modus-themes)
(message "Modus themes loaded.")) (message "Modus themes loaded."))
(when (memq 'doomthemes thwap-ui-themes) (when (memq 'doomthemes whomp-ui-themes)
(straight-use-package 'doom-themes) (straight-use-package 'doom-themes)
(require 'doom-themes) (require 'doom-themes)
(message "Doom themes loaded.")) (message "Doom themes loaded."))
(when (memq 'sublimethemes thwap-ui-themes) (when (memq 'sublimethemes whomp-ui-themes)
(straight-use-package 'sublime-themes) (straight-use-package 'sublime-themes)
(require 'sublime-themes) (require 'sublime-themes)
(message "Sublime themes loaded.")) (message "Sublime themes loaded."))
(when (memq 'kaolinthemes thwap-ui-themes) (when (memq 'kaolinthemes whomp-ui-themes)
(straight-use-package 'kaolin-themes) (straight-use-package 'kaolin-themes)
(require 'kaolin-themes) (require 'kaolin-themes)
(message "Kaolin themes loaded.")) (message "Kaolin themes loaded."))
(when (memq 'alectthemes thwap-ui-themes) (when (memq 'alectthemes whomp-ui-themes)
(straight-use-package 'alect-themes) (straight-use-package 'alect-themes)
(require 'alect-themes) (require 'alect-themes)
(message "Alect themes loaded.")) (message "Alect themes loaded."))
(when (memq 'wombat thwap-ui-themes)
'(thwap-ui-theme 'wombat)
(message "Wombat themes loaded."))
;; load the theme specified in the config if it is set ;; load the theme specified in the config if it is set
;; if things look wonky, you probably either need to install the ;; if things look wonky, you probably either need to install the
;; theme or you need to check your spelling. ;; theme or you need to check your spelling.
(if thwap-ui-theme (if whomp-ui-theme
(load-theme thwap-ui-theme :no-confirm) (load-theme whomp-ui-theme :no-confirm)
(message "Theme loaded: %s" thwap-ui-theme)) (message "Theme loaded: %s" whomp-ui-theme))
;; icon bits ;; icon bits
(when (and (eq 'alltheicons thwap-ui-icons) (not (eq 'nerdicons thwap-ui-icons))) (when (and (eq 'alltheicons whomp-ui-icons) (not (eq 'nerdicons whomp-ui-icons)))
(use-package all-the-icons (use-package all-the-icons
:ensure t :ensure t
:straight t :straight t
@ -82,7 +77,7 @@
(all-the-icons-completion-mode 1)) (all-the-icons-completion-mode 1))
(message "All-the-icons loaded.")) (message "All-the-icons loaded."))
(when (and (eq 'nerdicons thwap-ui-icons) (not (eq 'alltheicons thwap-ui-icons))) (when (and (eq 'nerdicons whomp-ui-icons) (not (eq 'alltheicons whomp-ui-icons)))
(use-package nerd-icons (use-package nerd-icons
:straight (nerd-icons :straight (nerd-icons
:type git :type git
@ -97,7 +92,7 @@
) )
(message "Nerd-icons loaded.")) (message "Nerd-icons loaded."))
(when (and (eq 'nerdicons thwap-ui-icons) (eq 'alltheicons thwap-ui-icons)) (when (and (eq 'nerdicons whomp-ui-icons) (eq 'alltheicons whomp-ui-icons))
(message "Both all-the-icons and nerd-icons are enabled. Disabling nerd-icons.") (message "Both all-the-icons and nerd-icons are enabled. Disabling nerd-icons.")
(use-package all-the-icons-dired (use-package all-the-icons-dired
:ensure t :ensure t
@ -112,5 +107,5 @@
(message "All-the-icons loaded.")) (message "All-the-icons loaded."))
(message "T.H.W.A.P. Interface settings loaded.") (message "W.H.O.M.P. Interface settings loaded.")
(provide 'thwap-interface) (provide 'whomp-interface)

View File

@ -3,7 +3,7 @@
;; ;;
;; org layer toggles ;; org layer toggles
(defcustom thwap-orgmode nil (defcustom whomp-orgmode nil
"Choose from the available org-mode packages" "Choose from the available org-mode packages"
:type '(set (const :tag "Org" orgmode) :type '(set (const :tag "Org" orgmode)
(const :tag "Org-Bullets" orgbullets) (const :tag "Org-Bullets" orgbullets)
@ -14,23 +14,23 @@
(const :tag "Org-Transclusion" orgtransclusion) (const :tag "Org-Transclusion" orgtransclusion)
(const :tag "Org-Roam" orgroam) (const :tag "Org-Roam" orgroam)
(const :tag "Org-Publish" orgpublish)) (const :tag "Org-Publish" orgpublish))
:group 'thwap-config) :group 'whomp-config)
;; org-babel extras ;; org-babel extras
(defcustom thwap-orgbabel nil (defcustom whomp-orgbabel nil
"Choose extra packages for org-babel" "Choose extra packages for org-babel"
:type '(set (const :tag "ob-mermaid" obmermaid) :type '(set (const :tag "ob-mermaid" obmermaid)
(const :tag "ob-napkin" obnapkin)) (const :tag "ob-napkin" obnapkin))
:group 'thwap-config) :group 'whomp-config)
;; ;;
;; Ensure Org mode is installed and loaded ;; Ensure Org mode is installed and loaded
;; ;;
;; base ;; base
(when (memq 'orgmode thwap-orgmode) (when (memq 'orgmode whomp-orgmode)
(straight-use-package 'org) (straight-use-package 'org)
(thwap/ensure-directory-exists "~/org") (whomp/ensure-directory-exists "~/org")
(setq browse-url-browser-function 'browse-url-generic (setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program "firefox-esr" browse-url-generic-program "firefox-esr"
org-log-done 'time org-log-done 'time
@ -41,7 +41,7 @@
org-default-notes-file "~/org/index.org" org-default-notes-file "~/org/index.org"
org-export-with-sub-superscripts t org-export-with-sub-superscripts t
org-export-with-toc t) org-export-with-toc t)
(thwap/org-agenda-files-update) (whomp/org-agenda-files-update)
(setq org-todo-keywords (setq org-todo-keywords
'((sequence "TODO(t)" "WAITING(w)" "BLOCKED(b)" "|" "IN-PROGRESS(i)") '((sequence "TODO(t)" "WAITING(w)" "BLOCKED(b)" "|" "IN-PROGRESS(i)")
(sequence "WONTDO(o)" "DEPRECATED(e)" "STUPID(s)" "|" "DONE(d)"))) (sequence "WONTDO(o)" "DEPRECATED(e)" "STUPID(s)" "|" "DONE(d)")))
@ -67,50 +67,50 @@
(org . t) (org . t)
(ruby . t) (ruby . t)
(shell . t))) (shell . t)))
(add-hook 'org-mode-hook 'thwap/org-agenda-files-update) (add-hook 'org-mode-hook 'whomp/org-agenda-files-update)
(add-hook 'org-mode-hook 'visual-line-mode) (add-hook 'org-mode-hook 'visual-line-mode)
;; Org mode stuff ;; Org mode stuff
(thwap/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.")
(thwap/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.")
(thwap/add-key-binding "o a" 'org-agenda "Open the Org agenda.") (whomp/add-key-binding "o a" 'org-agenda "Open the Org agenda.")
(thwap/add-key-binding "o n" 'org-capture "Capture a new task.") (whomp/add-key-binding "o n" 'org-capture "Capture a new task.")
(thwap/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.")
(thwap/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.")
(thwap/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.")
(thwap/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.")
(thwap/add-key-binding "o r" 'org-refile "Refile the current task.") (whomp/add-key-binding "o r" 'org-refile "Refile the current task.")
(thwap/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 thwap-orgmode) (memq 'orgbullets thwap-orgmode)) (when (and (memq 'orgmode whomp-orgmode) (memq 'orgbullets whomp-orgmode))
(straight-use-package 'org-bullets) (straight-use-package 'org-bullets)
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
(message "org-bullets loaded")) (message "org-bullets loaded"))
;; org-super-agenda ;; org-super-agenda
(when (and (memq 'orgmode thwap-orgmode) (memq 'orgsuperagenda thwap-orgmode)) (when (and (memq 'orgmode whomp-orgmode) (memq 'orgsuperagenda whomp-orgmode))
(straight-use-package 'org-super-agenda) (straight-use-package 'org-super-agenda)
(add-hook 'org-agenda-mode-hook 'org-super-agenda-mode) (add-hook 'org-agenda-mode-hook 'org-super-agenda-mode)
(message "org-super-agenda loaded")) (message "org-super-agenda loaded"))
;; org-modern ;; org-modern
(when (and (memq 'orgmode thwap-orgmode) (memq 'orgmodern thwap-orgmode)) (when (and (memq 'orgmode whomp-orgmode) (memq 'orgmodern whomp-orgmode))
(straight-use-package 'org-modern) (straight-use-package 'org-modern)
(message "org-modern loaded")) (message "org-modern loaded"))
;; org-timeblock ;; org-timeblock
(when (and (memq 'orgmode thwap-orgmode) (memq 'orgtimeblock thwap-orgmode)) (when (and (memq 'orgmode whomp-orgmode) (memq 'orgtimeblock whomp-orgmode))
(straight-use-package 'org-timeblock) (straight-use-package 'org-timeblock)
(message "org-timeblock loaded")) (message "org-timeblock loaded"))
;; org-download ;; org-download
(when (and (memq 'orgmode thwap-orgmode) (memq 'orgdownload thwap-orgmode)) (when (and (memq 'orgmode whomp-orgmode) (memq 'orgdownload whomp-orgmode))
(add-hook 'dired-mode-hook 'org-download-enable) (add-hook 'dired-mode-hook 'org-download-enable)
(message "org-download loaded")) (message "org-download loaded"))
;; org-roam ;; org-roam
(when (and (memq 'orgmode thwap-orgmode) (memq 'orgroam thwap-orgmode)) (when (and (memq 'orgmode whomp-orgmode) (memq 'orgroam whomp-orgmode))
(straight-use-package 'org-roam) (straight-use-package 'org-roam)
(org-roam-db-autosync-mode) (org-roam-db-autosync-mode)
(setq org-roam-v2-ack t) (setq org-roam-v2-ack t)
@ -120,14 +120,9 @@
(setq org-roam-capture-templates (setq org-roam-capture-templates
'(("d" "default" plain "%?" '(("d" "default" plain "%?"
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
:unnarrowed t))) :unnarrowed t))))
;; (add-hook 'after-init-hook 'org-roam)
;; (add-hook 'org-mode-hook 'org-roam)
;;(add-hook 'org-mode-hook 'org-roam-ui-mode)
) (when (and (memq 'orgmode whomp-orgmode) (memq 'orgpublish whomp-orgmode))
(when (and (memq 'orgmode thwap-orgmode) (memq 'orgpublish thwap-orgmode))
(require 'ox-publish) (require 'ox-publish)
(setq org-publish-project-alist (setq org-publish-project-alist
'( '(
@ -140,28 +135,27 @@
:headline-levels 4 ; Just the default for this project. :headline-levels 4 ; Just the default for this project.
:auto-preamble t :auto-preamble t
) )
)) )))
)
;; ;; org-roam-ui ;; ;; org-roam-ui
;; (when (and thwap-org-enable-org thwap-org-enable-org-roam thwap-org-enable-org-roam-ui) ;; (when (and whomp-org-enable-org whomp-org-enable-org-roam whomp-org-enable-org-roam-ui)
;; (straight-use-package 'org-roam-ui) ;; (straight-use-package 'org-roam-ui)
;; (setq org-roam-ui-sync-theme t) ;; (setq org-roam-ui-sync-theme t)
;; (setq org-roam-ui-follow t) ;; (setq org-roam-ui-follow t)
;; (setq org-roam-ui-update-on-save t)) ;; (setq org-roam-ui-update-on-save t))
;; org-transclusion ;; org-transclusion
(when (and (memq 'orgmode thwap-orgmode) (memq 'orgtransclusion thwap-orgmode)) (when (and (memq 'orgmode whomp-orgmode) (memq 'orgtransclusion whomp-orgmode))
(straight-use-package 'org-transclusion) (straight-use-package 'org-transclusion)
(message "org-transclusion loaded")) (message "org-transclusion loaded"))
;; ob-mermaid ;; ob-mermaid
(when (and (memq 'orgmode thwap-orgmode) (memq 'obmermaid thwap-orgbabel)) (when (and (memq 'orgmode whomp-orgmode) (memq 'obmermaid whomp-orgbabel))
(straight-use-package 'ob-mermaid) (straight-use-package 'ob-mermaid)
(add-to-list 'org-src-lang-modes '("mermaid" . mermaid)) (add-to-list 'org-src-lang-modes '("mermaid" . mermaid))
(add-to-list 'org-babel-load-languages '(mermaid . t)) (add-to-list 'org-babel-load-languages '(mermaid . t))
(message "ob-mermaid loaded")) (message "ob-mermaid loaded"))
(message "T.H.W.A.P. Org-Mode settings loaded") (message "W.H.O.M.P. Org-Mode settings loaded")
(provide 'thwap-orgmode) (provide 'whomp-orgmode)
;; thwap-orgmode.el ends here ;; whomp-orgmode.el ends here