]> 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:

make tiling/floating/maximising flexible, floating by default
[etc/awesome.git] / .config / awesome / rc.lua
index 8d95a9f70bb04cc06bfeb2b87e27506eb739e5d3..580024229f8c2434eb57898ad001236b5519a4cc 100644 (file)
@@ -40,6 +40,7 @@ layouts =
 -- the application class or instance. The instance is useful when running
 -- a console app in a terminal like (Music on Console)
 --    xterm -name mocp -e mocp
+-- OVERRULED BY TILEDAPPS BELOW
 floatapps =
 {
     -- by class
@@ -51,12 +52,29 @@ floatapps =
     ["Play stream"] = true
 }
 
+-- Applications that should never float, assuming everything else floats
+-- (by instance)
+tiledapps =
+{
+    ["urxvt"] = true
+}
+
+-- Applications that should be maximised
+-- (by instance)
+maxapps =
+{
+    ["Navigator"] = true,
+    -- jpilot is -v
+    ["-v"] = true
+}
+
 -- Applications to be moved to a pre-defined tag by class or instance.
 -- Use the screen and tags indices.
 apptags =
 {
     ["Iceweasel"] = { screen = 1, tag = 9 },
-    ["jpilot"] = { screen = 1, tag = 8 },
+    -- jpilot is -v
+    ["-v"] = { screen = 1, tag = 8 },
 }
 
 -- Define if we want to use titlebar on all applications.
@@ -399,6 +417,7 @@ function hook_manage(c)
     client.focus = c
 
     -- Check if the application should be floating.
+    -- OVERRIDDEN, SEE tiledapps BELOW
     local cls = c.class
     local inst = c.instance
     if floatapps[cls] then
@@ -407,6 +426,9 @@ function hook_manage(c)
         c.floating = floatapps[inst]
     end
 
+    -- Override with tiledapps
+    c.floating = not tiledapps[inst]
+
     -- Check application->screen/tag mappings.
     local target
     if apptags[cls] then
@@ -421,6 +443,11 @@ function hook_manage(c)
 
     -- Honor size hints
     c.honorsizehints = true
+
+    -- Maximise some
+    if maxapps[inst] then
+      awful.client.maximize(c)
+    end
 end
 
 -- Hook function to execute when arranging the screen