From 60b5df1308135d460d6980bc5110f544555300f0 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 29 Jul 2017 19:58:45 +0200 Subject: [PATCH] awful.tag: Apply a default layout to tags (#1952) Related-to: https://github.com/awesomeWM/awesome/pull/1950 Signed-off-by: Uli Schlachter --- lib/awful/tag.lua | 4 ++++ tests/test-awful-tag.lua | 1 + 2 files changed, 5 insertions(+) diff --git a/lib/awful/tag.lua b/lib/awful/tag.lua index 17ee0fb1..11e80fff 100644 --- a/lib/awful/tag.lua +++ b/lib/awful/tag.lua @@ -745,6 +745,10 @@ function tag.object.set_layout(t, layout) return layout end +function tag.object.get_layout(t) + return tag.getproperty(t, "layout") or require("awful.layout.suit.floating") +end + --- Set layout. -- @deprecated awful.tag.setlayout -- @see layout diff --git a/tests/test-awful-tag.lua b/tests/test-awful-tag.lua index 6abf1221..c299862d 100644 --- a/tests/test-awful-tag.lua +++ b/tests/test-awful-tag.lua @@ -69,6 +69,7 @@ local steps = { assert(beautiful.awesome_icon) local t = awful.tag.add("Test", {clients={c}, icon = beautiful.awesome_icon}) + assert(t.layout == awful.layout.suit.floating) check_order()