]> git.madduck.net Git - etc/awesome.git/blobdiff - .config/awesome/rc.lua

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

toggle maximised also vertical/horizontal
[etc/awesome.git] / .config / awesome / rc.lua
index c558b8dc0b5221d7466a73e517b8a7161a760cfe..cb4d7e1696b014cca3ea264590020a9c77b9e7c1 100644 (file)
@@ -387,8 +387,24 @@ clientkeys = awful.util.table.join(
     awful.key({ modkey,           }, "n",      function (c) c.minimized = not c.minimized    end),
     awful.key({ modkey,           }, "m",
         function (c)
-            c.maximized_horizontal = not c.maximized_horizontal
-            c.maximized_vertical   = not c.maximized_vertical
+            -- silly lua can't do bitwise operations
+            if not c.maximized_horizontal and not c.maximized_vertical then
+                c.maximized_horizontal = true
+                c.maximized_vertical = true
+            elseif c.maximized_horizontal and c.maximized_vertical then
+                c.maximized_horizontal = false
+                c.maximized_vertical = true
+            elseif not c.maximized_horizontal and c.maximized_vertical then
+                c.maximized_horizontal = true
+                c.maximized_vertical = false
+            elseif c.maximized_horizontal and not c.maximized_vertical then
+                c.maximized_horizontal = false
+                c.maximized_vertical = false
+            end
+            -- b = c.maximized_horizontal + c.maximized_vertical * 2
+            -- b = (b + 1) % 4
+            -- c.maximized_horizontal = b & 1
+            -- c.maximized_vertical = (b & 2) >>1
         end)
 )
 
@@ -469,7 +485,7 @@ globalkeys = awful.util.table.join(globalkeys,
   awful.key({ cmdmodkey }, "m", function () awful.util.spawn(terminal .. " -e mutt -f =store") end),
   awful.key({ cmdmodkey }, "t", function () awful.util.spawn(terminal) end),
   awful.key({ cmdmodkey }, "y", function () awful.util.spawn(terminal .. " -e python") end),
-  awful.key({ cmdmodkey }, "c", function () awful.util.spawn(terminal .. " -e wyrd") end),
+  awful.key({ cmdmodkey }, "c", function () awful.util.spawn("icedove") end),
   awful.key({ cmdmodkey }, "r", function () mypromptbox[mouse.screen]:run() end),
   awful.key({ cmdmodkey }, "g", function () awful.util.spawn("gscan2pdf") end),
   awful.key({ cmdmodkey }, "o", function () awful.util.spawn("okular") end),
@@ -501,6 +517,8 @@ awful.rules.rules = {
       properties = { floating = false, tag = tags[screen.count()][screen.count() == 1 and 2 or 1], switchtotag = true } },
     { rule = { class = "Iceweasel", instance = "Navigator" },
       properties = { tag = tags[screen.count() == 3 and 1 or screen.count()][9], switchtotag = false, floating = false } },
+    { rule = { class = "Icedove", instance = "Mail" },
+      properties = { tag = tags[screen.count() == 3 and 1 or screen.count()][8], switchtotag = false, floating = false } },
 --    { rule = { class = "Iceweasel", instance = "Dialog" },
 --      properties = { floating = true } },
     { rule = { class = "Jpilot", instance = "jpilot" },