cross-posted from: https://lemmy.zip/post/71142365

local function closeAllWindows()
   local windows = hl.get_windows()

   for _,w in pairs(windows) do
   	hl.dispatch(hl.dsp.window.close({ window = w }))
   end
end

local function closeAllWindowsCurrentWorkspace()
   local cws = hl.get_active_workspace()
   local windows = hl.get_windows({ workspace = cws })

   for _,w in pairs(windows) do
   	hl.dispatch(hl.dsp.window.close({ window = w }))
   end
end

-- Probably add another mod key for safety reasons.
hl.bind(M .. "+BackSpace", closeAllWindowsCurrentWorkspace )
hl.bind(M .. "+Delete", closeAllWindows )

no comments (yet)

sorted by: hot top controversial new old
there doesn't seem to be anything here