fixed #1184. Calling movetotag method throw an error on a blank screen
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
fd8f2e23ee
commit
81b5e6e54b
|
@ -315,17 +315,21 @@ for i = 1, 9 do
|
||||||
end),
|
end),
|
||||||
awful.key({ modkey, "Shift" }, "#" .. i + 9,
|
awful.key({ modkey, "Shift" }, "#" .. i + 9,
|
||||||
function ()
|
function ()
|
||||||
|
if client.focus then
|
||||||
local tag = awful.tag.gettags(client.focus.screen)[i]
|
local tag = awful.tag.gettags(client.focus.screen)[i]
|
||||||
if client.focus and tag then
|
if tag then
|
||||||
awful.client.movetotag(tag)
|
awful.client.movetotag(tag)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end),
|
end),
|
||||||
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
|
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
|
||||||
function ()
|
function ()
|
||||||
|
if client.focus then
|
||||||
local tag = awful.tag.gettags(client.focus.screen)[i]
|
local tag = awful.tag.gettags(client.focus.screen)[i]
|
||||||
if client.focus and tag then
|
if tag then
|
||||||
awful.client.toggletag(tag)
|
awful.client.toggletag(tag)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end))
|
end))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue