'Returns the client previous to \'win\' in layout.
or None if there is no such client'

def focus_previous(self, win):

    for (idx, col) in enumerate(self.columns):
        if (win in col):
            prev = col.focus_previous(win)
            if prev:
                return prev
            else:
                break
    if (idx > 0):
        return self.columns[(idx - 1)].focus_last()
