From 8e2afdd7784d2e1a61b0b261f11080e670dae7c0 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sun, 15 Jul 2012 12:54:34 +0200 Subject: [PATCH] quake: if quake console is closed, mark it as not visible --- lib/quake.lua | 8 +++++++- rc/bindings.lua | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/quake.lua b/lib/quake.lua index d8abc86..abde385 100644 --- a/lib/quake.lua +++ b/lib/quake.lua @@ -127,10 +127,16 @@ function QuakeConsole:new(config) local console = setmetatable(config, { __index = QuakeConsole }) capi.client.add_signal("manage", function(c) - if c.name == console.name and c.screen == console.screen then + if c.icon_name == console.name and c.screen == console.screen then console:display() end end) + capi.client.add_signal("unmanage", + function(c) + if c.icon_name == console.name and c.screen == console.screen then + console.visible = false + end + end) local reattach = capi.timer { timeout = 0 } reattach:add_signal("timeout", diff --git a/rc/bindings.lua b/rc/bindings.lua index c631b4a..efa556b 100644 --- a/rc/bindings.lua +++ b/rc/bindings.lua @@ -19,7 +19,7 @@ local function client_info() local inf = { "name", "icon_name", "type", "class", "role", "instance", "pid", - "icon_name", "skip_taskbar", "id", "group_window", "leader_id", "machine", + "skip_taskbar", "id", "group_window", "leader_id", "machine", "screen", "hidden", "minimized", "size_hints_honor", "titlebar", "urgent", "focus", "opacity", "ontop", "above", "below", "fullscreen", "transient_for", "maximixed_horizontal", "maximixed_vertical", "sticky", "modal", "focusable"