X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/75b19142c160825b0f5ce25feea7eea9970844c6..176f4d75e1749df77aa8929cb79b4865c2fddaa5:/layout/centerwork.lua?ds=inline diff --git a/layout/centerwork.lua b/layout/centerwork.lua index 8bcbf60..a8d9a96 100644 --- a/layout/centerwork.lua +++ b/layout/centerwork.lua @@ -10,9 +10,9 @@ --]] -local tag = require("awful.tag") -local tonumber = tonumber -local math = { floor = math.floor } +local tonumber = tonumber +local math = { floor = math.floor } +local scr = require("awful.screen") local centerwork = { name = "centerwork", @@ -23,6 +23,9 @@ local function do_centerwork(p, orientation) -- Screen. local wa = p.workarea local cls = p.clients + local ta = scr.focused().selected_tag + + if not ta then return end if #cls <= 0 then return end @@ -33,7 +36,7 @@ local function do_centerwork(p, orientation) local g = {} -- Main column, fixed width and height. - local mwfact = tag.object.get_master_width_factor(t) + local mwfact = ta.master_width_factor local mainhei = math.floor(wa.height * mwfact) local mainwid = math.floor(wa.width * mwfact) local slavewid = wa.width - mainwid