persist workspaces
This commit is contained in:
+21
-1
@@ -1,6 +1,26 @@
|
||||
-- Create persistent master-layout workspaces from the shared workspace list.
|
||||
-- Create persistent numbered workspaces and dedicated named workspaces.
|
||||
local settings = require("config.settings")
|
||||
|
||||
-- Number keys address workspaces 1-9 directly and the 0 key addresses
|
||||
-- workspace 10. Odd-numbered workspaces live on the left/primary monitor;
|
||||
-- even-numbered workspaces, including workspace 10, live on the right/secondary
|
||||
-- monitor.
|
||||
for workspace = 1, 10 do
|
||||
local monitor = settings.monitors.primary.output
|
||||
|
||||
if workspace % 2 == 0 then
|
||||
monitor = settings.monitors.secondary.output
|
||||
end
|
||||
|
||||
hl.workspace_rule({
|
||||
workspace = tostring(workspace),
|
||||
monitor = monitor,
|
||||
persistent = true,
|
||||
})
|
||||
end
|
||||
|
||||
-- Named workspaces keep their individually selected layouts and remain on the
|
||||
-- right-hand monitor.
|
||||
for _, workspace in ipairs(settings.named_workspaces) do
|
||||
hl.workspace_rule({
|
||||
workspace = workspace.selector,
|
||||
|
||||
Reference in New Issue
Block a user