Move Window to Workspace Left/Right

Moving Window to Workspace Left/Right
While the default rc.lua configuration file includes keyboard shortcuts to move the focused window to an enumerated tag, an alternate way to move windows between tags is to shift them one tag to the left or right. The following keybinding functions will perform this task, moving the focused window one workspace to the left or right (and wrapping at the edges).

This script assumes there are exactly 9 tags per screen, each with a distinct index value. If the focused window has more than one tag, it will be moved to the left/right of the leftmost tag, and lose any other tags it has. The keybindings are "mod4+shift+," and "mod4+shift+." because these are the keys on most keyboards.

Awesome 3.4
awful.key({ modkey, "Shift"  }, ",",     function (c)         local curidx = awful.tag.getidx(c:tags[1])         if curidx == 1 then             c:tags({screen[mouse.screen]:tags[9]})         else             c:tags({screen[mouse.screen]:tags[curidx - 1]})         end     end), awful.key({ modkey, "Shift"  }, ".",   function (c)         local curidx = awful.tag.getidx(c:tags[1])         if curidx == 9 then             c:tags({screen[mouse.screen]:tags[1]})         else             c:tags({screen[mouse.screen]:tags[curidx + 1]})         end     end)

Awesome 3.5
awful.key({ modkey, "Shift"  }, ",",    function (c)        local curidx = awful.tag.getidx        if curidx == 1 then            awful.client.movetotag(tags[client.focus.screen][9])        else            awful.client.movetotag(tags[client.focus.screen][curidx - 1])        end    end), awful.key({ modkey, "Shift"  }, ".",    function (c)        local curidx = awful.tag.getidx        if curidx == 9 then            awful.client.movetotag(tags[client.focus.screen][1])        else            awful.client.movetotag(tags[client.focus.screen][curidx + 1])        end    end)

These functions must be placed in the clientkeys table.

Drag Window to Workspace Left/Right
This script adds drag window left/right functionality similar to OpenBox (alt+shift+left|right) or Gnome 2 (alt+ctrl+shift+left|right) type functionality. This script should work for any number of tags/workspaces and have multi-screen support. The keybindings are "mod4+shift+left" and "mod4+shift+right"

These functions must be placed in the clientkeys table.

Awesome 3.5
-- Drag windows left and right awful.key({ modkey, "Shift"  }, "Left",    function (c)       local curidx = awful.tag.getidx       if curidx == 1 then           awful.client.movetotag(tags[client.focus.screen][#tags[client.focus.screen]])       else           awful.client.movetotag(tags[client.focus.screen][curidx - 1])       end       awful.tag.viewidx(-1)   end), awful.key({ modkey, "Shift"  }, "Right",   function (c)       local curidx = awful.tag.getidx       if curidx == #tags[client.focus.screen] then           awful.client.movetotag(tags[client.focus.screen][1])       else           awful.client.movetotag(tags[client.focus.screen][curidx + 1])       end       awful.tag.viewidx(1)   end),

Awesome 3.4
Please write one.