From 96166882b25750d03cb50bed1eadb6fc3c29a675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Sun, 15 Jan 2023 20:16:02 +0100 Subject: [PATCH] Re-enable panel hiding on full-screen --- awesome/components/pastel/top-panel.lua | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/awesome/components/pastel/top-panel.lua b/awesome/components/pastel/top-panel.lua index e253c92..5587aec 100644 --- a/awesome/components/pastel/top-panel.lua +++ b/awesome/components/pastel/top-panel.lua @@ -1,11 +1,3 @@ --- ████████╗ ██████╗ ██████╗ █ --- █████╗ █████╗ ███╗ ██╗███████╗██╗ --- ╚══██╔══╝██╔═══██╗██╔══██╗ ██╔══██╗██╔══██╗████╗ ██║██╔════╝██║ --- ██║ ██║ ██║██████╔╝ ██████╔╝███████║██╔██╗ ██║█████╗ ██║ --- ██║ ██║ ██║██╔═══╝ ██╔═══╝ ██╔══██║██║╚██╗██║██╔══╝ ██║ --- ██║ ╚██████╔╝██║ ██║ ██║ ██║██║ ╚████║███████╗███████╗ --- ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚══════╝ - -- =================================================================== -- Initialization -- =================================================================== @@ -142,6 +134,17 @@ top_panel.create = function(s) -- Functionality -- =================================================================== + -- hide panel when client is fullscreen + local function change_panel_visibility(client) + if client.screen == s then + panel.ontop = not client.fullscreen + end + end + + -- connect panel visibility function to relevant signals + client.connect_signal("property::fullscreen", change_panel_visibility) + client.connect_signal("focus", change_panel_visibility) + client.connect_signal("focus", function (c, _) current_tag_list:reset(current_tag_list) current_tag_list:add(tag_lists[c.screen])