X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=config%2Fawesome%2Frc.lua;h=f044cc1b3fdf365f62b4acab349ee727366ca4a4;hb=fa23f70a41285c9ffda6640e3a982d5ebe724266;hp=28feec751807117a666e9b0f80560ee4aadb793b;hpb=c6583ae562fe456c5366be7d6068055d73a0f340;p=~madcoder%2Fdotfiles.git diff --git a/config/awesome/rc.lua b/config/awesome/rc.lua index 28feec7..f044cc1 100644 --- a/config/awesome/rc.lua +++ b/config/awesome/rc.lua @@ -322,6 +322,7 @@ globalkeys = { key(k_m, "Return", function() awful.util.spawn(terminal) end), key(k_ac, "r", awesome.restart), key(k_m, "F12", function() awful.util.spawn(lock) end), + key({}, "#148", function()awful.util.spawn("kcalc") end), -- Layout manipulation key(k_m, "l", function () awful.tag.incmwfact(0.05) end), @@ -348,6 +349,12 @@ globalkeys = { awful.prompt.bash, awful.util.getdir("cache").."/lua_commands") end), + + key({}, "#192", function() eminent.tag.goto(1, nil, true) end), + key({}, "#193", function() eminent.tag.goto(2, nil, true) end), + key({}, "#194", function() eminent.tag.goto(3, nil, true) end), + key({}, "#195", function() eminent.tag.goto(4, nil, true) end), + key({}, "#196", function() eminent.tag.goto(5, nil, true) end), } -- Mod+#: Switch to tag @@ -444,7 +451,9 @@ awful.hooks.manage.register(function (c, startup) -- Make certain windows floating local name = c.name:lower() - if name:find('pinentry') then + if name:find('pinentry') + or name:find('kcalc') + then c.floating = true end @@ -458,22 +467,19 @@ end) -- (tag switch, new client, etc) awful.hooks.arrange.register(function (screen) local sel = client.focus + if not sel then sel = awful.client.focus.history.get(screen, 0) - if sel then client.focus = sel end + if not sel then return end + client.focus = sel end - --[[ - if sel then - local m_c = mouse.coords() - - if m_c.x < sel.x - 1 or m_c.x > sel.x + sel.width + 1 or - m_c.y < sel.y - 1 or m_c.y > sel.y + sel.height + 1 then - if #m_c.buttons == 0 then - mouse.coords{x = sel.x + 5, y = sel.y + 5} - end - end + + local o = mouse.object_under_pointer() + if not o or (type(o) == "client" and o ~= sel) then + local g = sel:geometry() + + mouse.coords { x = g.x + 5, y = g.y + 5 } end - ]]-- end) -- }}}