From 31033da4602ff11852275edd7bf2989680879753 Mon Sep 17 00:00:00 2001 From: Urbano Ustero Date: Thu, 27 Aug 2015 20:48:35 +0200 Subject: [PATCH] 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)) --- exwm-workspace.el | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/exwm-workspace.el b/exwm-workspace.el index 5e9dba9..838cd29 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -362,12 +362,8 @@ The optional FORCE option is for internal use only." (dolist (i initial-workspaces) (unless (frame-parameter i 'window-id) (setq initial-workspaces (delq i initial-workspaces)))) - (cl-assert (= 1 (exwm-workspace--count))) - ;; Prevent user from deleting this frame by accident + ;; Prevent user from deleting the first frame by accident (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 (dolist (i initial-workspaces) (exwm-workspace--add-frame-as-workspace i))