From e431dbc13860afb5b700c5f409716b28d3c2b4c0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 18 Oct 2021 00:42:17 +0200 Subject: [PATCH] fix(doom-dashboard,workspaces): module init order Change (and simplify) the load order of Doom's dashboard and persp-mode so that the dashboard always initializes later. This and 0ab6aba should fix #5643. Fix #5643 Ref 0ab6aba05664 --- modules/ui/doom-dashboard/config.el | 2 +- modules/ui/workspaces/config.el | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index 32ea06b74..aceb39d5c 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -134,7 +134,7 @@ PLIST can have the following properties: (add-hook 'persp-activated-functions #'+doom-dashboard-reload-maybe-h)) (add-hook 'persp-before-switch-functions #'+doom-dashboard--persp-record-project-h))) -(add-hook 'doom-init-ui-hook #'+doom-dashboard-init-h) +(add-hook 'doom-init-ui-hook #'+doom-dashboard-init-h 'append) ;; ;;; Faces diff --git a/modules/ui/workspaces/config.el b/modules/ui/workspaces/config.el index b23a98e1f..e4a8ce980 100644 --- a/modules/ui/workspaces/config.el +++ b/modules/ui/workspaces/config.el @@ -37,15 +37,9 @@ stored in `persp-save-dir'.") ;; Packages (use-package! persp-mode + :unless noninteractive :commands persp-switch-to-buffer - :init - (add-hook! 'doom-init-modules-hook - (defun +workspaces-init-h () - (unless noninteractive - ;; Remove default buffer predicate so persp-mode can put in its own - (delq! 'buffer-predicate default-frame-alist 'assq) - (require 'persp-mode) - (persp-mode +1)))) + :hook (doom-init-ui . persp-mode) :config (setq persp-autokill-buffer-on-remove 'kill-weak persp-reset-windows-on-nil-window-conf nil