From 5177d3eab6276fefc846d730a6f64065d1aeedd0 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 8 Apr 2020 17:20:40 +0200 Subject: workspace: add desktops automatically --- workspace.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'workspace.lua') 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 = {} -- cgit v1.2.3