From b1d40ac03001891fbc3ae186787cf04d885403be Mon Sep 17 00:00:00 2001 From: James Reed Date: Sun, 7 Nov 2021 15:52:39 -0700 Subject: [PATCH] workspace: Don't delete tags with pending clients --- workspace.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/workspace.lua b/workspace.lua index ba1e6a2..733b29c 100644 --- a/workspace.lua +++ b/workspace.lua @@ -11,11 +11,13 @@ local naughty = require("naughty") local gtable = require("gears.table") local gtimer = require("gears.timer") local protected_call = require("gears.protected_call") -local launch = require("awesome-launch") local lgi = require("lgi") local Gio, GLib, GObject = lgi.Gio, lgi.GLib, lgi.GObject +local launch = require("awesome-launch") +local shared = require("awesome-launch.shared") + local ws = {} ws.client = {} @@ -113,6 +115,11 @@ function ws.new(name, args) local function delete() gtimer.delayed_call(function () + for _, data in pairs(shared.pending) do + if data.props.tag and data.props.tag == tag then + return + end + end if not tag.selected and #tag:clients() == 0 then tag:delete() end