feat(calendar): only initialize calfw if necessary
If the *calendar* workspace is already populated with calfw buffers, there is no reason to re-initialize calfw.
This commit is contained in:
parent
9d14d093c0
commit
31a6fa77d0
1 changed files with 6 additions and 2 deletions
|
@ -18,8 +18,12 @@
|
||||||
(if (modulep! :ui workspaces)
|
(if (modulep! :ui workspaces)
|
||||||
(progn
|
(progn
|
||||||
(+workspace-switch +calendar-workspace-name t)
|
(+workspace-switch +calendar-workspace-name t)
|
||||||
(doom/switch-to-scratch-buffer)
|
(unless (memq (buffer-local-value 'major-mode
|
||||||
(+calendar--init)
|
(window-buffer (selected-window)))
|
||||||
|
'(cfw:details-mode
|
||||||
|
cfw:calendar-mode))
|
||||||
|
(doom/switch-to-scratch-buffer)
|
||||||
|
(+calendar--init))
|
||||||
(+workspace/display))
|
(+workspace/display))
|
||||||
(setq +calendar--wconf (current-window-configuration))
|
(setq +calendar--wconf (current-window-configuration))
|
||||||
(delete-other-windows)
|
(delete-other-windows)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue