From: 2009 Date: Wed, 21 Jun 2017 01:02:41 +0000 (+1000) Subject: Fix issue with `add_tag` when not using floating layout X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/8a433a285b52a1e26b58b4d04350f273b482a061?ds=inline;hp=--cc Fix issue with `add_tag` when not using floating layout Using `awful.layout.layouts[0]` was causing `add_tag` to always be set to floating rather than the first entry in `awful.layout.layouts`. This would be fine for users who were using the floating layout, but would otherwise break the layoutbox widget and changing layouts. --- 8a433a285b52a1e26b58b4d04350f273b482a061 diff --git a/util/init.lua b/util/init.lua index 1fc5805..1163f49 100644 --- a/util/init.lua +++ b/util/init.lua @@ -117,7 +117,7 @@ function util.add_tag(layout) textbox = awful.screen.focused().mypromptbox.widget, exe_callback = function(name) if not name or #name == 0 then return end - awful.tag.add(name, { screen = awful.screen.focused(), layout = layout or awful.layout.layouts[0] }):view_only() + awful.tag.add(name, { screen = awful.screen.focused(), layout = layout or awful.layout.layouts[1] }):view_only() end } end