summaryrefslogtreecommitdiff
path: root/workspace.lua
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-04-08 17:20:40 +0200
committerAnton Khirnov <anton@khirnov.net>2020-04-08 17:20:40 +0200
commit5177d3eab6276fefc846d730a6f64065d1aeedd0 (patch)
treeb9277af8358c72ca11266ec2739771cbfe41da15 /workspace.lua
parent6a5e3dd3ba90bb775fda96c48debb60fc128a901 (diff)
workspace: add desktops automatically
Diffstat (limited to 'workspace.lua')
-rw-r--r--workspace.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/workspace.lua b/workspace.lua
index 9337ec2..ad985df 100644
--- a/workspace.lua
+++ b/workspace.lua
@@ -48,6 +48,10 @@ function Workspace:_apply_state()
end
function Workspace:view(screen, desktop, page_idx)
+ if self.desktops[desktop] == nil then
+ print("Adding desktop " .. desktop)
+ self:add_desktop(desktop, "Desktop " .. desktop, 10)
+ end
print("workspace: " .. screen.index .. ": view " .. desktop .. "/" .. (page_idx or "nil"))
-- the page currently displayed on the target screen
local old = {}