Created
April 9, 2014 00:42
-
-
Save ramnes/10213933 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/libqtile/config.py b/libqtile/config.py | |
index c175549..148ec12 100644 | |
--- a/libqtile/config.py | |
+++ b/libqtile/config.py | |
@@ -332,7 +332,7 @@ class Group(object): | |
certain Matched windows to be on them, hide when they're not in use, etc. | |
""" | |
def __init__(self, name, matches=None, exclusive=False, | |
- spawn=None, layout=None, persist=True, init=True, | |
+ spawn=None, layout=None, layouts=None, persist=True, init=True, | |
layout_opts=None, screen_affinity=None, position=sys.maxint): | |
""" | |
:param name: the name of this group | |
@@ -357,6 +357,7 @@ class Group(object): | |
self.exclusive = exclusive | |
self.spawn = spawn | |
self.layout = layout | |
+ self.layouts = layouts | |
self.persist = persist | |
self.init = init | |
self.matches = matches or [] | |
diff --git a/libqtile/manager.py b/libqtile/manager.py | |
index e33c96a..f88696a 100644 | |
--- a/libqtile/manager.py | |
+++ b/libqtile/manager.py | |
@@ -296,13 +296,13 @@ class Qtile(command.CommandObject): | |
) | |
self.root.set_property("_NET_CURRENT_DESKTOP", index) | |
- def addGroup(self, name, layout=None): | |
+ def addGroup(self, name, layout=None, layouts=None): | |
if name not in self.groupMap.keys(): | |
g = _Group(name, layout) | |
self.groups.append(g) | |
- g._configure( | |
- self.config.layouts, self.config.floating_layout, self | |
- ) | |
+ if not layouts: | |
+ layouts = self.config.layouts | |
+ g._configure(layouts, self.config.floating_layout, self) | |
self.groupMap[name] = g | |
hook.fire("addgroup", self, name) | |
hook.fire("changegroup") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment