]> git.rmz.io Git - dotfiles.git/blobdiff - awesome/bindings.lua
no need for sudo here
[dotfiles.git] / awesome / bindings.lua
index 20e81a76c5de4f9e3d81c71675be7bb6fce5f0f6..6b17723d0b9a3a359ca2d3480c75b9ca4b3d9409 100644 (file)
@@ -1,3 +1,10 @@
+-- Default modkey.
+-- Usually, Mod4 is the key with a logo between Control and Alt.
+-- If you do not like this or do not have such a key,
+-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
+-- However, you can use another modifier like Mod1, but it may interact with others.
+modkey = "Mod4"
+
 -- {{{ Mouse bindings
 root.buttons(awful.util.table.join(
     awful.button({ }, 3, function () mymainmenu:toggle() end),
@@ -28,7 +35,6 @@ globalkeys = awful.util.table.join(
             awful.client.focus.byidx(-1)
             if client.focus then client.focus:raise() end
         end),
-    awful.key({ modkey }, "w",   function () mymainmenu:show() end),
 
     -- Layout manipulation
     awful.key({ modkey, "Shift"   }, "j", function () awful.client.swap.byidx(  1)    end),
@@ -68,13 +74,21 @@ globalkeys = awful.util.table.join(
     -- }}}
 
     -- {{{ My Keys
+    -- Menu
+    awful.key({ modkey }, "w", function () mymainmenu:show({ coords = { x = 0, y = 0}}) end),
+    -- Lock
+    awful.key({ modkey, "Control" }, "l", function () awful.util.spawn("slock") end),
     -- Prompt
     awful.key({ modkey }, "space", function () mypromptbox[mouse.screen]:run() end),
     -- switch layout
     awful.key({ modkey }, "]", function () awful.layout.inc(layouts,  1) end),
     awful.key({ modkey }, "[", function () awful.layout.inc(layouts, -1) end),
+    -- resize slave
+    awful.key({ modkey, "Control" }, "j",      function () awful.client.incwfact( 0.05)  end),
+    awful.key({ modkey, "Control" }, "k",      function () awful.client.incwfact(-0.05)  end),
     -- Ksnapshot
-    awful.key({        }, "F13", function () awful.util.spawn("ksnapshot") end),
+    awful.key({        }, "F13",   function () awful.util.spawn("ksnapshot") end),
+    awful.key({        }, "Print", function () awful.util.spawn("ksnapshot") end),
     -- Layout manipulation
     awful.key({ modkey,           }, "#94",   function () awful.screen.focus_relative( 1) end), -- that's the key left of 1
     awful.key({ modkey, "Control" }, "Left",  function () awful.screen.focus_relative( 1) end),
@@ -118,10 +132,7 @@ clientkeys = awful.util.table.join(
     awful.key({ modkey, "Shift" }, "#94",      awful.client.movetoscreen ),
     -- ontop and below
     awful.key({ modkey,           }, "t",      function (c) c.ontop = not c.ontop            end),
-    awful.key({ modkey,           }, "b",      function (c) c.below = not c.below            end),
-    -- resize slave
-    awful.key({ modkey, "Control" }, "j",      function (c) awful.client.incwfact( 0.05, c)  end),
-    awful.key({ modkey, "Control" }, "k",      function (c) awful.client.incwfact(-0.05, c)  end)
+    awful.key({ modkey,           }, "b",      function (c) c.below = not c.below            end)
     -- }}}
 )
 -- }}}