diff options
Diffstat (limited to 'workspace.lua')
-rw-r--r-- | workspace.lua | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/workspace.lua b/workspace.lua index bfdc02e..fb632db 100644 --- a/workspace.lua +++ b/workspace.lua @@ -17,7 +17,7 @@ local function desk_find_empty_page(desk) return nil end -function Workspace:add_desktop(idx, name, nb_pages) +function Workspace:_add_desktop(idx, name, nb_pages) local desk = object() desk.name = name @@ -77,11 +77,6 @@ end function Workspace:view(screen, desktop_idx, page_idx) print("workspace: " .. screen.index .. ": view " .. desktop_idx .. "/" .. (page_idx or "nil")) - if self.desktops[desktop_idx] == nil then - print("Adding desktop " .. desktop_idx) - self:add_desktop(desktop_idx, "Desktop " .. desktop_idx, 10) - end - local desktop = self.desktops[desktop_idx] -- the current state of the target screen @@ -189,6 +184,10 @@ function Workspace:new(layouts) o.signals = object() + for i = 1, 12 do + o:_add_desktop(i, "Desktop " .. i, 10) + end + return o end |