mirror of
https://github.com/elenapan/dotfiles.git
synced 2026-05-11 17:35:57 +08:00
Fix window_switcher attempting to raise killed clients
This commit is contained in:
parent
412e838e0e
commit
e44be4f480
1 changed files with 12 additions and 2 deletions
|
|
@ -157,6 +157,16 @@ local unminimize = function()
|
|||
end
|
||||
end
|
||||
|
||||
local close = function()
|
||||
if client.focus then
|
||||
-- Remove bad reference to client.focus
|
||||
if client.focus == window_switcher_first_client then
|
||||
window_switcher_first_client = nil
|
||||
end
|
||||
client.focus:kill()
|
||||
end
|
||||
end
|
||||
|
||||
-- Set up keybinds
|
||||
-- Single keys only
|
||||
local keybinds = {
|
||||
|
|
@ -167,8 +177,8 @@ local keybinds = {
|
|||
['N'] = unminimize,
|
||||
['u'] = unminimize, -- `u` for up
|
||||
-- Close
|
||||
['d'] = function() if client.focus then client.focus:kill() end end,
|
||||
['q'] = function() if client.focus then client.focus:kill() end end,
|
||||
['d'] = close,
|
||||
['q'] = close,
|
||||
-- Move with vim keys
|
||||
['j'] = function() awful.client.focus.byidx(1) end,
|
||||
['k'] = function() awful.client.focus.byidx(-1) end,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue