All pastes #1240330 Raw Edit

working lua awesome3 config for

public lua v1 · immutable
#1240330 ·published 2008-10-30 06:13 UTC
rendered paste body
-- {{{ Key bindings-- Bind keyboard digits-- Compute the maximum number of digit we need, limited to 9modkey = 'Control'keynumber = 0 for s = 1, screen.count() do    keynumber = math.min(9, math.max(#tags[s], keynumber)); end  for 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() end modkey = 'Mod4'