XRandR Screen Table

awesome 3.5
as of the commits 9393b2d1 and c08b9034 this functionality is builtin and documented (commit 29ecc609). Simply use it as in client.focus.screen = screen["VGA"].index

This of course doesn't need any external utility.

awesome prior 3.5
This small function can be used to address screens by their XRandR names instead of numbers. Paste it into your rc.lua. Update by klaernie: the new version computes the screen numbers by their left edge instead of the order in xrandr -q. Also it respects the primary display as screen 1. function xrandr_screens local screens = {} local handle = io.popen("xrandr -q") for display,primary,left in handle:read("*all"):gmatch("([%a%d-]+) connected (p*)r*i*m*a*r*y* *[%d]+x[%d]+%+([%d]+)%+[%d]+") do       if primary == "p" then -- if this screen is the primary one it will get screen 1 in awesome -- so let's force it to be the first in the list by overriding it's            -- left edge screens[#screens+1] = {display=display,left=-1} else screens[#screens+1] = {display=display,left=tonumber(left)} end end handle:close -- sort the screens by their left edge table.sort(screens,function(a,b)                           return a.left<b.left                        end) -- expand the temporary table back to   -- screens["input"]=screen id    local tmpscreens = {} for index,spec in pairs(screens) do       tmpscreens[spec.display] = index end return tmpscreens end Then use it like this, for example: screens = xrandr_screens client.focus.screen = screens["VGA"] Please note that this function needs the xrandr tool installed.