You are not logged in.

#51 2009-02-15 19:30:19

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Poor man's Tiling Window manager

i can't speak to the logistics of it all, but i will say i'm in love with this setup.  the flexibility of having my normal floating openbox setup, then switch to the efficiency of a tiling WM with a few simple keystrokes is so useful.  i would kill to have this when stuck in my windows box at work.  i know windows does _some_ sort of tiling, but it's not exactly useful in my opinion.

[feature-request]
i've mapped W-Tab to the swap function which works well.  what i think would be awesome is if that could take on a more Alt-Tab like behavior where W-Tab would do more of a cycle than a swap through your windows in the order they've been active (and Shift-W-Tab would reverse).  right now, i usually Alt-Tab to a particular tiled window, then W-Tab to swap it to the main window.  consolidating this would be amazing.  i can somewhat visualize how this would work but i just can't code it out.  anyone agree? or even understand what i mean?
[/feature-request]

Offline

#52 2009-02-16 11:01:33

ninian
Member
From: United Kingdom
Registered: 2008-02-24
Posts: 696
Website

Re: Poor man's Tiling Window manager

@Nepherte and @brisbin33:

I encountered the same error caused by some upgrade which makes 'xdotool getactivewindow' return an error message as well as an integer. The following fix in lines 39/40 of manage.py seems to work:

def get_active_window():
    return str(hex(int(commands.getoutput("xdotool getactivewindow 2>/dev/null").split()[0])))

big_smile Happy tiling again!

Added later: just saw we're not alone with this problem: http://bbs.archlinux.org/viewtopic.php?id=65403&p=1

Last edited by ninian (2009-02-16 11:17:44)

Offline

#53 2009-02-16 20:34:24

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: Poor man's Tiling Window manager

Sorry guys for not responding ... I was on vacation for 3 days....far away from the web and all this noise...


brisbin33 wrote:

[feature-request]
i've mapped W-Tab to the swap function which works well.  what i think would be awesome is if that could take on a more Alt-Tab like behavior where W-Tab would do more of a cycle than a swap through your windows in the order they've been active (and Shift-W-Tab would reverse).  right now, i usually Alt-Tab to a particular tiled window, then W-Tab to swap it to the main window.  consolidating this would be amazing.  i can somewhat visualize how this would work but i just can't code it out.  anyone agree? or even understand what i mean?
[/feature-request]

def cycle():
    winlist = create_win_list()
    winlist.insert(0,winlist[len(winlist)-1])
    winlist = winlist[:-1]
    arrange(get_simple_tile(len(winlist)),winlist)

This seems to do what you requested. Not tested thoroughly though.

Last edited by u_no_hu (2009-02-16 20:39:50)


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#54 2009-02-17 12:50:26

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Poor man's Tiling Window manager

@ninian and u_no_hu... i love our community, i will try these asap.  thanks!

Offline

#55 2009-02-17 16:36:05

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: Poor man's Tiling Window manager

@ninian
Thanks for the fix


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#56 2009-03-03 00:15:53

adamlau
Member
Registered: 2009-01-30
Posts: 327

Re: Poor man's Tiling Window manager

It seems as if the script does not work with JWM if additional workspaces are not clicked into first.

After logging into JWM and then running wmctrl -d

Cannot get current desktop properties. (_NET_CURRENT_DESKTOP or _WIN_WORKSPACE property)

After logging into JWM, clicking into the second workspace on the panel and then running wmctrl -d

0  * DG: 1440x900  VP: 0,0  WA: 0,0 1440x900  1
1  - DG: 1440x900  VP: N/A  WA: 0,0 1440x900  2

The script works as expected only after the second workspace is clicked into.


NetBSD 64-bit + Xfce
Arch Linux / spectrwm

Offline

#57 2009-03-03 05:07:40

sfauzia
Member
Registered: 2009-01-11
Posts: 88

Re: Poor man's Tiling Window manager

u_no_hu wrote:

Basically a simple python script which does tiling on any windowmanager (Perfectly on pekwm and openbox. Partly on compiz due to the fact that compiz says it has a single desktop even if there are 4 virtual desktops, which means all the windows you have will be tiled).
It uses wmctrl to get the info and manage the windows. Bind it to a key or to autowhatever-on-window-creation-hook.

Currently options are
simple - The basic tiling layout . 1 Main + all other at the side.

left,right - Does the new windows7 ish style of sticking to the sides.

swap - will swap the active window to master column

cycle - cycle the window in master column

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

Edit : Moved here git://github.com/TheWanderer/poor-man-s-tiling-window-manager.git
Edit 2 : fixed issue of iconified windows showing blank areas in layout.
Edit 3 : Added swap

This is purely awesome! I think cycle is my favorite, with three windows open. I've never used a tiling WM before, and now I'm definitely glad I've stuck with my old friend Openbox smile Was well worth it to patch wmctrl to make this functional. Thanks!

Offline

#58 2009-03-10 05:25:28

sfauzia
Member
Registered: 2009-01-11
Posts: 88

Re: Poor man's Tiling Window manager

u_no_hu wrote:

Edit 2 : fixed issue of iconified windows showing blank areas in layout.

Well, I am actually having blank areas in my layout, but I don't use window titles.

[edit] I just tested turning on and off the window decorations, and with decorations enabled there's only a tiny sliver available of the screen, which is perhaps there to access the right-click menu, but other than that, absolutely no gaps. Without window decorations is exactly as I reported: wide, gaping gaps. Hope this won't be trouble to fix. [/edit]

[edit] I fixed it by just removing all instances of window title and window border, as I don't use either, from the code. Works perfectly now. I hope this helps anyone else with the same issue. [/edit]

Last edited by sfauzia (2009-03-10 06:11:51)

Offline

#59 2009-03-10 07:46:02

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: Poor man's Tiling Window manager

@sfuzia
you can change those in the script

BottomPadding = 0
TopPadding = 0
LeftPadding = 0
RightPadding = 0
WinTitle = 21
WinBorder = 1

Try adjusting WinTitle and WinBorder. Trial and error wink


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#60 2009-03-10 11:54:21

arkusk
Member
Registered: 2009-03-10
Posts: 3

Re: Poor man's Tiling Window manager

hi all
I'm on Xubuntu 8.10 hence my wm is xfwm4. when I execute the script this is what I get:

a@a-laptop:~/scripts/poor-man-s-tiling-window-manager$ python manage.py simple
manage.py:43: Warning: 'with' will become a reserved keyword in Python 2.6
  File "manage.py", line 43
    with open(file, 'w') as f:
            ^
SyntaxError: invalid syntax

any help appreciated
cheers
Arian

Offline

#61 2009-03-10 12:17:07

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: Poor man's Tiling Window manager

@arkusk
It may be because your are using python 2.5. Try adding this at top of the script

from __future__ import with_statement

Or just use arch linux for the latest wink


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#62 2009-03-10 13:53:33

arkusk
Member
Registered: 2009-03-10
Posts: 3

Re: Poor man's Tiling Window manager

@u_no_hu
thanks, that fixed it!

Offline

#63 2009-03-10 14:40:03

arkusk
Member
Registered: 2009-03-10
Posts: 3

Re: Poor man's Tiling Window manager

Ubuntu Intrepid seems to use an older version of xdotools. So if you get this error:

Traceback (most recent call last):
  File "manage.py", line 189, in <module>
    swap()
  File "manage.py", line 169, in swap
    active = get_active_window()
  File "manage.py", line 40, in get_active_window
    return str(hex(int(commands.getoutput("xdotool getactivewindow 2>/dev/null").split()[0])))
IndexError: list index out of range

and you don't feel like compiling the most recent xdotools version from source , change line 40 in manage.py from

    return str(hex(int(commands.getoutput("xdotool getactivewindow 2>/dev/null").split()[0])))

to

    return str(hex(int(commands.getoutput("xdotool getwindowfocus 2>/dev/null").split()[0])))

Last edited by arkusk (2009-03-17 14:57:59)

Offline

#64 2009-03-17 08:28:16

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,860
Website

Re: Poor man's Tiling Window manager

brisbin33 wrote:

i can't speak to the logistics of it all, but i will say i'm in love with this setup.  the flexibility of having my normal floating openbox setup, then switch to the efficiency of a tiling WM with a few simple keystrokes is so useful.  i would kill to have this when stuck in my windows box at work.  i know windows does _some_ sort of tiling, but it's not exactly useful in my opinion.

http://www.winsplit-revolution.com/ - it doesnt get much better than this...

Last edited by Rasi (2009-03-17 08:28:40)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#65 2009-03-17 08:53:06

ninian
Member
From: United Kingdom
Registered: 2008-02-24
Posts: 696
Website

Re: Poor man's Tiling Window manager

arkusk wrote:

you don't feel like compiling the most recent xdotools version from source , change line 40 in manage.py

Great - thanks for that tip!
big_smile

Offline

#66 2009-03-17 13:19:15

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Poor man's Tiling Window manager

Rasi wrote:
brisbin33 wrote:

i can't speak to the logistics of it all, but i will say i'm in love with this setup.  the flexibility of having my normal floating openbox setup, then switch to the efficiency of a tiling WM with a few simple keystrokes is so useful.  i would kill to have this when stuck in my windows box at work.  i know windows does _some_ sort of tiling, but it's not exactly useful in my opinion.

http://www.winsplit-revolution.com/ - it doesnt get much better than this...

that looks awesome, will try soon.  thanks

Offline

#67 2009-03-17 20:29:08

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,860
Website

Re: Poor man's Tiling Window manager

Feature Request: Simple vertical tiling


Also: On kde4 the window decoration is ignored is this intended?
And: Can one have the simple tiling with 50/50 tiling?

Last edited by Rasi (2009-03-17 20:32:38)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#68 2009-03-17 21:05:47

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: Poor man's Tiling Window manager

Rasi wrote:

Feature Request: Simple vertical tiling

Done. Call with vertical as parameter . Let me know if you find any bugs.


Rasi wrote:

Also: On kde4 the window decoration is ignored is this intended?

And: Can one have the simple tiling with 50/50 tiling?

You can adjust the wintitle and winborder values in the script according to wm and decorations.  ANd MwFactor for 50/50 .


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#69 2009-03-17 21:09:11

Nepherte
Member
From: Belgium
Registered: 2008-09-09
Posts: 427
Website

Re: Poor man's Tiling Window manager

I will repeat my question of a page back as I didn't get an answer: is there an easy way to include maximized windows in the list of windows that have to be tiled?

Last edited by Nepherte (2009-03-17 21:09:30)

Offline

#70 2009-03-17 21:31:52

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: Poor man's Tiling Window manager

@Nepherte
Which window manager are you using? In openbox it seems it is not possible to resize a maximised window. Check if there is any work around. If its not there we can try replacing openbox maximise with the script smile


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#71 2009-03-17 21:32:45

Nepherte
Member
From: Belgium
Registered: 2008-09-09
Posts: 427
Website

Re: Poor man's Tiling Window manager

I'm using metacity.

Offline

#72 2009-03-17 21:50:30

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: Poor man's Tiling Window manager

I don't have metacity to test this. So you can try with "wmctrl -e ...... " to resize a maximized window and check if it works.


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#73 2009-03-17 23:24:26

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,860
Website

Re: Poor man's Tiling Window manager

u_no_hu wrote:
Rasi wrote:

Feature Request: Simple vertical tiling

Done. Call with vertical as parameter . Let me know if you find any bugs.


Rasi wrote:

Also: On kde4 the window decoration is ignored is this intended?

And: Can one have the simple tiling with 50/50 tiling?

You can adjust the wintitle and winborder values in the script according to wm and decorations.  ANd MwFactor for 50/50 .

ok... this is great, but i guess i meant the "other vertical" lol

WINDOW1
-----------
WINDOW2

Last edited by Rasi (2009-03-17 23:46:53)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#74 2009-03-18 06:28:49

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: Poor man's Tiling Window manager

Rasi wrote:

ok... this is great, but i guess i meant the "other vertical" lol

Done. How difficult can it be to swap x and y wink . Call with horizontal as parameter


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#75 2009-03-19 23:29:01

adamlau
Member
Registered: 2009-01-30
Posts: 327

Re: Poor man's Tiling Window manager

Or a maximize all option, breaking tiling mode back to stacking.


NetBSD 64-bit + Xfce
Arch Linux / spectrwm

Offline

Board footer

Powered by FluxBB