Allow filling workspace list by creating frames

Users can pre-fill the workspace list by creating frames in their
configuration.  For example, to start up with 4 workspaces:

    (dolist (i 3)
      (make-frame))
This commit is contained in:
Urbano Ustero 2015-08-27 20:48:35 +02:00
parent 483d77b60f
commit 31033da460

View file

@ -362,12 +362,8 @@ The optional FORCE option is for internal use only."
(dolist (i initial-workspaces) (dolist (i initial-workspaces)
(unless (frame-parameter i 'window-id) (unless (frame-parameter i 'window-id)
(setq initial-workspaces (delq i initial-workspaces)))) (setq initial-workspaces (delq i initial-workspaces))))
(cl-assert (= 1 (exwm-workspace--count))) ;; Prevent user from deleting the first frame by accident
;; Prevent user from deleting this frame by accident
(set-frame-parameter (car initial-workspaces) 'client nil)) (set-frame-parameter (car initial-workspaces) 'client nil))
;; TODO: this prevents user having a creating initial workspaces by making
;; frames in their configuration before launching EXWM.
(cl-assert (= 1 (length initial-workspaces)))
;; Configure workspaces ;; Configure workspaces
(dolist (i initial-workspaces) (dolist (i initial-workspaces)
(exwm-workspace--add-frame-as-workspace i)) (exwm-workspace--add-frame-as-workspace i))