Awesome: condition optimization
parent
446e901b20
commit
4a978a39ff
|
@ -552,18 +552,23 @@ for i = 1, keynumber do
|
||||||
|
|
||||||
awful.key({ modkey, "Mod1" }, "#" .. i + 9,
|
awful.key({ modkey, "Mod1" }, "#" .. i + 9,
|
||||||
function ()
|
function ()
|
||||||
if client.focus and tags[client.focus.screen][i] then
|
if client.focus then
|
||||||
awful.client.movetotag(tags[client.focus.screen][i])
|
local tag = awful.tag.gettags(client.focus.screen)[i]
|
||||||
|
if tag then
|
||||||
|
awful.client.movetotag(tag)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end),
|
end),
|
||||||
|
|
||||||
-- Multi screen
|
-- Multi screen
|
||||||
awful.key({ modkey, "Control" }, "#" .. i + 9,
|
awful.key({ modkey, "Control" }, "#" .. i + 9,
|
||||||
function ()
|
function ()
|
||||||
if client.focus and tags[client.focus.screen+1] and tags[client.focus.screen+1][i] then
|
if client.focus then
|
||||||
awful.client.movetotag(tags[client.focus.screen+1][i])
|
if tags[client.focus.screen+1] and tags[client.focus.screen+1][i] then
|
||||||
elseif client.focus and tags[1][i] then
|
awful.client.movetotag(tags[client.focus.screen+1][i])
|
||||||
awful.client.movetotag(tags[1][i])
|
elseif tags[1][i] then
|
||||||
|
awful.client.movetotag(tags[1][i])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue