refactor: Reorganize config with use-package and optimize startup hooks
- Split monolithic init-package.el into focused modules - Convert eager `:init` blocks to lazy `:hook` - Consolidate UI settings and defer theme loading. - Remove duplicated config between GUI and terminal paths.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
(when *is-linux*
|
||||
(use-package exwm
|
||||
:defer t
|
||||
:config
|
||||
(setq pop-up-windows nil)
|
||||
(setq exwm-workspace-number 1)
|
||||
@@ -112,8 +113,9 @@
|
||||
|
||||
(use-package desktop-environment
|
||||
:after exwm
|
||||
:demand t
|
||||
:init
|
||||
(desktop-environment-mode)
|
||||
(add-hook 'exwm-wm-mode-hook 'desktop-environment-mode)
|
||||
:config
|
||||
(advice-add 'desktop-environment-screenshot :after
|
||||
(lambda (&rest _) (message "Saved fullscreen screenshot.")))
|
||||
@@ -143,20 +145,7 @@
|
||||
(with-eval-after-load 'consult
|
||||
(unless (memq 'xdg-launcher-consult-source consult-buffer-sources)
|
||||
(setq consult-buffer-sources
|
||||
(append consult-buffer-sources '(xdg-launcher-consult-source))))))
|
||||
|
||||
(use-package debase
|
||||
:straight
|
||||
(debase :type git
|
||||
:host codeberg
|
||||
:repo "emacs-weirdware/debase"))
|
||||
|
||||
(use-package discomfort
|
||||
:commands discomfort
|
||||
:straight
|
||||
(discomfort :type git
|
||||
:host codeberg
|
||||
:repo "emacs-weirdware/discomfort")))
|
||||
(append consult-buffer-sources '(xdg-launcher-consult-source)))))))
|
||||
|
||||
(provide 'init-exwm)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user