Skip to content

Commit

Permalink
patched the tile layout to support my focus patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
uberj committed Apr 20, 2012
1 parent 04a95ba commit 7db8dd6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions libqtile/layout/tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ def focus(self, c):
self.focused = c

def blur(self):
self.focused = None
for client in self.clients:
self.configure(client, self.group.screen, blur=True)

def add(self, c):
index = 0
Expand All @@ -141,7 +142,7 @@ def remove(self, c):
self.focused = self.clients[0]
return self.focused

def configure(self, c, screen):
def configure(self, c, screen, blur=False):
screenWidth = screen.width
screenHeight = screen.height
x = y = w = h = 0
Expand All @@ -160,10 +161,11 @@ def configure(self, c, screen):
h = screenHeight/(len(self.slave_windows))
x = screen.x + int(screenWidth*self.ratio)
y = screen.y + self.clients[self.master:].index(c)*h
if c is self.focused:
bc = self.group.qtile.colorPixel(self.border_focus)
else:
if blur or c is not self.focused:
bc = self.group.qtile.colorPixel(self.border_normal)
else:
bc = self.group.qtile.colorPixel(self.border_focus)

c.place(
x,
y,
Expand Down

0 comments on commit 7db8dd6

Please sign in to comment.