Skip to content

Commit

Permalink
max_all - Maximize all windows
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWanderer committed Mar 29, 2009
1 parent 8dd8185 commit b2ebcef
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cycle - Cycle all the windows in the master pane
vertical - Simple vertical tiling
horizontal - Simple horizontal tiling
maximize - Maximize the active window/ for openbox which doesn't permit resizing of max windows
max_all - Maximize all windows

On first run it will create a config file ~/.stilerrc. Modify the values to suit your window decorations/Desktop padding.

Expand Down
22 changes: 22 additions & 0 deletions stiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,18 @@ def get_horiz_tile(wincount):

return layout

def get_max_all(wincount):
layout = []
x = OrigX
y = OrigY
height = MaxHeight - WinTitle - WinBorder
width = MaxWidth
for n in range(0,wincount):
layout.append((x,y,width,height))

return layout



def move_active(PosX,PosY,Width,Height):
command = " wmctrl -r :ACTIVE: -e 0," + str(PosX) + "," + str(PosY)+ "," + str(Width) + "," + str(Height)
Expand Down Expand Up @@ -267,6 +279,14 @@ def maximize():
move_active(PosX,PosY,Width,Height)
raise_window(":ACTIVE:")

def max_all():
winlist = create_win_list()
active = get_active_window()
winlist.remove(active)
winlist.insert(0,active)
arrange(get_max_all(len(winlist)),winlist)



if sys.argv[1] == "left":
left()
Expand All @@ -284,4 +304,6 @@ def maximize():
cycle()
elif sys.argv[1] == "maximize":
maximize()
elif sys.argv[1] == "max_all":
max_all()

0 comments on commit b2ebcef

Please sign in to comment.