-- {{{ Key bindings-- Bind keyboard digits-- Compute the maximum number of digit we need, limited to 9modkey = 'Control'keynumber = 0for s = 1, screen.count() do keynumber = math.min(9, math.max(#tags[s], keynumber)); endfor i = 1, keynumber do keybinding({ modkey }, 'F' .. i, function () local screen = mouse.screen if tags[screen][i] then awful.tag.viewonly(tags[screen][i]) end end):add() keybinding({ modkey, "Mod1" }, 'F' .. i, function () local screen = mouse.screen if tags[screen][i] then tags[screen][i].selected = not tags[screen][i].selected end end):add() keybinding({ modkey, "Shift" }, 'F' .. i, function () local sel = client.focus if sel then if tags[sel.screen][i] then awful.client.movetotag(tags[sel.screen][i]) end end end):add() keybinding({ modkey, "Mod1", "Shift" }, 'F' .. i, function () local sel = client.focus if sel then if tags[sel.screen][i] then awful.client.toggletag(tags[sel.screen][i]) end end end):add() endmodkey = 'Mod4'