awesome: be sure it loads my keymap
[~madcoder/dotfiles.git] / config / awesome / rc.lua
index 2fdd266..7f42ed3 100644 (file)
@@ -322,7 +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),
+    key({}, "#148", function() awful.util.spawn("kcalc") end),
 
     -- Layout manipulation
     key(k_m,  "l", function () awful.tag.incmwfact(0.05) end),
@@ -467,22 +467,21 @@ 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)
 
 -- }}}
+
+awful.util.spawn("xkbcomp -w 0 -R/usr/share/X11/xkb ~/.Xkeyboard :0")