Skip to content

Commit

Permalink
added vertical tiling
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWanderer committed Mar 17, 2009
1 parent 3b06c1c commit 8a18763
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README
Expand Up @@ -10,6 +10,8 @@ swap - will swap the active window to master column

cycle - Cycle all the windows in the master pane

vertical - simple vertical tiling

You can change the main window factor BottomPadding TopPadding LeftPadding RightPadding though it detects most of the panels. You may have to change wintitle and border according to your theme.

If you need other layouts modify get_simple_tile
23 changes: 23 additions & 0 deletions manage.py
Expand Up @@ -85,6 +85,18 @@ def get_simple_tile(wincount):

return layout

def get_vertical_tile(wincount):
layout = []
y = OrigY
width = int(MaxWidth/wincount)
height = MaxHeight - WinTitle - WinBorder
for n in range(0,wincount):
x= OrigX + n * width
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 @@ -170,6 +182,15 @@ def swap():
winlist.insert(0,active)
arrange(get_simple_tile(len(winlist)),winlist)

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



def cycle():
winlist = create_win_list()
winlist.insert(0,winlist[len(winlist)-1])
Expand All @@ -184,6 +205,8 @@ def cycle():
right()
elif sys.argv[1] == "simple":
simple()
elif sys.argv[1] == "vertical":
vertical()
elif sys.argv[1] == "swap":
swap()
elif sys.argv[1] == "cycle":
Expand Down

0 comments on commit 8a18763

Please sign in to comment.