mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-07-16 13:14:20 +02:00
bindings: remove a window from the "undo" stack when it becomes unmanaged
This commit is contained in:
parent
e9304f8668
commit
f226acf2d3
1 changed files with 9 additions and 0 deletions
|
@ -23,6 +23,15 @@ end
|
|||
-- function that will effectively toggle things.
|
||||
local function toggle_window(filter)
|
||||
local undo = {} -- undo stack
|
||||
client.add_signal('unmanage',
|
||||
function(c)
|
||||
-- If the client is in the undo stack, remove it
|
||||
while true do
|
||||
idx = awful.util.table.hasitem(undo, c)
|
||||
if not idx then break end
|
||||
table.remove(undo, idx)
|
||||
end
|
||||
end)
|
||||
local toggle = function()
|
||||
-- "Current" screen
|
||||
local s = client.focus and client.focus.screen or mouse.screen
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue