Merge pull request #75 from jimeh/customizable-slot-for-default-workspace

Allow slot number of default workspace to be customizable
This commit is contained in:
Vasilij Schneidermann
2017-12-16 18:44:58 +01:00
committed by GitHub

View File

@ -144,6 +144,11 @@ t: Clean up and display the scratch buffer."
:type 'hook :type 'hook
:group 'eyebrowse) :group 'eyebrowse)
(defcustom eyebrowse-default-workspace-slot 1
"Slot number assigned to the default workspace."
:type 'integer
:group 'eyebrowse)
(defcustom eyebrowse-slot-format "%s" (defcustom eyebrowse-slot-format "%s"
"Format string for untagged slots. "Format string for untagged slots.
The following format codes are supported: The following format codes are supported:
@ -224,10 +229,11 @@ If FRAME is nil, use current frame. TYPE can be any of
(defun eyebrowse-init (&optional frame) (defun eyebrowse-init (&optional frame)
"Initialize Eyebrowse for the current frame." "Initialize Eyebrowse for the current frame."
(unless (eyebrowse--get 'window-configs frame) (unless (eyebrowse--get 'window-configs frame)
(eyebrowse--set 'last-slot 1 frame) (eyebrowse--set 'last-slot eyebrowse-default-workspace-slot frame)
(eyebrowse--set 'current-slot 1 frame) (eyebrowse--set 'current-slot eyebrowse-default-workspace-slot frame)
(eyebrowse--insert-in-window-config-list (eyebrowse--insert-in-window-config-list
(eyebrowse--current-window-config 1 "") frame))) (eyebrowse--current-window-config eyebrowse-default-workspace-slot "")
frame)))
(defun eyebrowse--update-window-config-element (new-element) (defun eyebrowse--update-window-config-element (new-element)
"Replace the old element with NEW-ELEMENT in the window config list. "Replace the old element with NEW-ELEMENT in the window config list.