You are not logged in.

#26 2009-02-01 12:59:24

oew
Member
From: Norway
Registered: 2006-11-08
Posts: 105

Re: Poor man's Tiling Window manager

@u_no_hu
It's the tabbed perl extension that causes urxvt to be launched with the -embed option.
When I disable it, everything is all good smile

Thanks for your help, and great effort on this project. I love it!


___
oew


there's no place like ~/

Offline

#27 2009-02-04 13:03:37

Nepherte
Member
From: Singapore
Registered: 2008-09-09
Posts: 427

Re: Poor man's Tiling Window manager

I'm getting this error with ./manage.py left

Traceback (most recent call last):
  File "./manage.py", line 63, in <module>
    (Desktop,OrigXstr,OrigYstr,MaxWidthStr,MaxHeightStr,WinList) = initialize()
  File "./manage.py", line 18, in initialize
    desk_list = [line.split()[0] for line in desk_output]
IndexError: list index out of range

other arguments fail as well. But I don't think it's a problem with your script, rather the laptop i'm using it on (gnome). wmctrl -d gives me:

$ wmctrl -d
GLib-ERROR **: gmem.c:156: failed to allocate 1117103813820448 bytes
aborting...

wmctrl -l

$ wmctrl -l0x00e00003 139642271694847 minerva Uitgeschoven onderrandpaneel
0x00e00026 4294967295 minerva Uitgeschoven bovenrandpaneel
0x0100001b 4294967295 minerva x-nautilus-desktop

Offline

#28 2009-02-04 14:40:43

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

Re: Poor man's Tiling Window manager

just upgraded to x86_64 and it seems to have broken this script.  it was working perfectly, now i get the same errors as Nepherte above.  i get the "list index out of range" error when using any argument and wmctrl -l only shows firefox even tho i also had urxvt open at the time.  haven't had much time to troubleshoot but i miss this script already.

Offline

#29 2009-02-04 15:20:13

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

Re: Poor man's Tiling Window manager

@brisbin33 & Nepherte

http://bbs.archlinux.org/viewtopic.php?pid=490377 seems to be a problem with wmctrl on 64 bit. Try the solution given there and open a bug report. smile


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

Subscribe to The Arch Daily News.

Offline

#30 2009-02-04 15:37:54

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: Poor man's Tiling Window manager

On KDE4.2 (not mod):

toad@archie ~/bin> python tiling
Traceback (most recent call last):
  File "tiling", line 162, in <module>
    if sys.argv[1] == "left":
IndexError: list index out of range

toad@archie ~/bin> wmctrl -d
0  - DG: 1280x1024  VP: 0,0  WA: 0,35 1280x954  Desktop 1
1  - DG: 1280x1024  VP: 0,0  WA: 0,35 1280x954  Desktop 2
2  - DG: 1280x1024  VP: 0,0  WA: 0,35 1280x954  Desktop 3
3  * DG: 1280x1024  VP: 0,0  WA: 0,35 1280x954  Desktop 4

never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#31 2009-02-04 15:50:22

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

Re: Poor man's Tiling Window manager

u_no_hu wrote:

@brisbin33 & Nepherte

http://bbs.archlinux.org/viewtopic.php?pid=490377 seems to be a problem with wmctrl on 64 bit. Try the solution given there and open a bug report. smile

many thanks; will try the patch tonight (or tomorrow)

Offline

#32 2009-02-04 15:54:16

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

Re: Poor man's Tiling Window manager

@toad
you have to pass the options depending on what you want to do

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


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

Subscribe to The Arch Daily News.

Offline

#33 2009-02-04 15:54:48

Nepherte
Member
From: Singapore
Registered: 2008-09-09
Posts: 427

Re: Poor man's Tiling Window manager

I tryed the patch and tiling now works. Many thanks for pointing out to the topic, I forgot to search for the error first.

Offline

#34 2009-02-04 16:03:53

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: Poor man's Tiling Window manager

Thanks, u_no_hu

with the simple option I get some kind of success. left,right has no effect and swap comes up with:

toad@archie ~/bin> python tiling swap
Traceback (most recent call last):
  File "tiling", line 169, in <module>
    swap()
  File "tiling", line 156, in swap
    active = get_active_window()
  File "tiling", line 40, in get_active_window
    return str(hex(int(commands.getoutput("xdotool getactivewindow").split()[0])))
ValueError: invalid literal for int() with base 10: 'sh:'


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#35 2009-02-04 16:08:20

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

Re: Poor man's Tiling Window manager

@Nepherte  If you can file a bug report on that, that will be helpful to others who have the same problem smile


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

Subscribe to The Arch Daily News.

Offline

#36 2009-02-04 16:10:14

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

Re: Poor man's Tiling Window manager

@toad  output of xdotool getactivewindow ?


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

Subscribe to The Arch Daily News.

Offline

#37 2009-02-04 16:18:22

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: Poor man's Tiling Window manager

56623106

I've got a number apps open but only kept two on this particular desktop (I am particularly keen on left,right).


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#38 2009-02-04 16:28:36

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

Re: Poor man's Tiling Window manager

@toad... then where did  that sh: come from ?!!
can you please post output of wmctrl -lG  and wmctrl -d


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

Subscribe to The Arch Daily News.

Offline

#39 2009-02-04 16:32:26

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: Poor man's Tiling Window manager

I did everything from within yakuake... Anyway, off to pub - back in no fit state to follow instructions wink

toad@archie ~/bin> wmctrl -lG
0x01c001df -1 0    0    1280 1024 archie Qt-subapplication
0x01c0004c -1 775  0    460  35   archie Qt-subapplication
0x01c0006a -1 65   989  141  35   archie Qt-subapplication
0x01c00083 -1 598  0    84   35   archie Qt-subapplication
0x01c00114 -1 93   0    64   35   archie Qt-subapplication
0x01c00120 -1 784  989  374  35   archie Qt-subapplication
0x01c00140 -1 301  0    126  35   archie Qt-subapplication
0x01c00173 -1 321  990  292  34   archie Qt-subapplication
0x068000fe  3 0    58   1280 931  archie Arch Linux Forums / Poor man's Tiling Window manager - Gran Paradiso
0x03600002 -1 64   35   1152 477  archie Yakuake

toad@archie ~/bin> wmctrl -d
0  - DG: 1280x1024  VP: 0,0  WA: 0,35 1280x954  Desktop 1
1  - DG: 1280x1024  VP: 0,0  WA: 0,35 1280x954  Desktop 2
2  - DG: 1280x1024  VP: 0,0  WA: 0,35 1280x954  Desktop 3
3  * DG: 1280x1024  VP: 0,0  WA: 0,35 1280x954  Desktop 4


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#40 2009-02-04 17:11:11

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

Re: Poor man's Tiling Window manager

@toad Sticky windows are excluded from tiling and snapping. You dont want all you sticky windows to be tiled ..do you smile It seems you have lots of them and yakuake is one of them.


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

Subscribe to The Arch Daily News.

Offline

#41 2009-02-04 19:59:01

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: Poor man's Tiling Window manager

Come back early from the pub - didn't pan out.

I am afraid I have no idea about sticky windows - I thought I was rid of that when I changed over to Linux wink

Hope whatever info you got out of this for the latest KDE was in any way useful. If you don't come across anyone wiser on KDE I'll be happy to assist further.

If you can cope with the ignorance - I take it as an opening to openbox smile

Last edited by toad (2009-02-04 20:01:09)


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#42 2009-02-04 21:05:04

Nepherte
Member
From: Singapore
Registered: 2008-09-09
Posts: 427

Re: Poor man's Tiling Window manager

I'm getting this error with swap function:

Traceback (most recent call last):
  File "/home/bart/Documenten/scripts/tiling.py", line 169, in <module>
    swap()
  File "/home/bart/Documenten/scripts/tiling.py", line 156, in swap
    active = get_active_window()
  File "/home/bart/Documenten/scripts/tiling.py", line 40, in get_active_window
    return str(hex(int(commands.getoutput("xdotool getactivewindow").split()[0])))
ValueError: invalid literal for int() with base 10: 'sh:'

I'm also a bit confused with the tiling function. I try it out with 2 windows: 1 terminal and one firefox. The program that was started as first will always be put on the left as the main window. Is this normal behavior? Wouldn't it make more sense if it were the active window instead of the one started first?

All considerations aside, I really like your tiling script!

Offline

#43 2009-02-04 23:57:46

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

Re: Poor man's Tiling Window manager

FYI: that patch fixed my problem... yay for having tiling back.

Offline

#44 2009-02-05 04:03:13

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

Re: Poor man's Tiling Window manager

Nepherte wrote:

I'm getting this error with swap function:

Traceback (most recent call last):
  File "/home/bart/Documenten/scripts/tiling.py", line 169, in <module>
    swap()
  File "/home/bart/Documenten/scripts/tiling.py", line 156, in swap
    active = get_active_window()
  File "/home/bart/Documenten/scripts/tiling.py", line 40, in get_active_window
    return str(hex(int(commands.getoutput("xdotool getactivewindow").split()[0])))
ValueError: invalid literal for int() with base 10: 'sh:'

I cant recreate this problem without more info on what you did. Try xdootool getactivewindow  in the same terminal in which you got this error. It should return a number (the windowid of the current window). In your case it is returning something else.


I'm also a bit confused with the tiling function. I try it out with 2 windows: 1 terminal and one firefox. The program that was started as first will always be put on the left as the main window. Is this normal behavior? Wouldn't it make more sense if it were the active window instead of the one started first?

Thats exactly what swap will do. smile  Now i dont use "simple" at all. I use swap for everything.

All considerations aside, I really like your tiling script!

Thanks smile


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

Subscribe to The Arch Daily News.

Offline

#45 2009-02-05 10:40:19

Nepherte
Member
From: Singapore
Registered: 2008-09-09
Posts: 427

Re: Poor man's Tiling Window manager

Now that's odd. After I installed xdotool the swap function magically works. That makes I have a fully functioning Poor man's Tiling Window manager. w00t smile

Edit: Not odd at all, manage.py uses xdotool tongue

Last edited by Nepherte (2009-02-05 10:43:08)

Offline

#46 2009-02-05 11:14:04

Nepherte
Member
From: Singapore
Registered: 2008-09-09
Posts: 427

Re: Poor man's Tiling Window manager

Would it be possible to include maximized windows in the whole tiling thing? Which lines do I have to edit for that?

Offline

#47 2009-02-12 22:48:58

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

Re: Poor man's Tiling Window manager

just to let you know:

a recent update started producing an error in various programs:

Xlib:  extension "Generic Event Extension" missing on display ":0.0".

every search result says basically, "it's a harmless error message, it'll go away next update".  this is true, all the programs i see it with work just fine.  it does however, break your swap() function for me though:

> python Scripts/manage.py swap
Traceback (most recent call last):
  File "Scripts/manage.py", line 169, in <module>
    swap()
  File "Scripts/manage.py", line 156, in swap
    active = get_active_window()
  File "Scripts/manage.py", line 40, in get_active_window
    return str(hex(int(commands.getoutput("xdotool getactivewindow").split()[0])))
ValueError: invalid literal for int() with base 10: 'Xlib:'

because:

> xdotool getactivewindow
Xlib:  extension "Generic Event Extension" missing on display ":0.0".
25165834

not sure if you want to add a workaround or just know that swap() won't work for some people until this bug's squashed upstream.

thanks,
pat

edit: typo and s/most\ people/some\ people//

Last edited by brisbin33 (2009-02-13 17:17:50)

Offline

#48 2009-02-13 06:30:55

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

Re: Poor man's Tiling Window manager

@brisbin33
I didnt get that error. May be it has been fixed in testing or latest version or my system likes me smile . Anyway you can try adding  a check for integer to the xdotool output, that would fix it(if not an integer try next line etc....).


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

Subscribe to The Arch Daily News.

Offline

#49 2009-02-13 14:27:58

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

Re: Poor man's Tiling Window manager

u_no_hu wrote:

you can try adding  a check for integer to the xdotool output, that would fix it(if not an integer try next line etc....).

/me goes to learn python... wink

Offline

#50 2009-02-15 00:16:09

HashBox
Member
Registered: 2009-01-22
Posts: 271

Re: Poor man's Tiling Window manager

This may not be particularly relevant to this thread, but then it partly is, but I just wanted to get someones opinion on it. What if some form of generic tiling library was made, preferably in C for portability, that was also able to be easily extended, that only handled the tiling _logic_. Then this library could be coupled with various frontends, you could have one for wmctrl + xdotool, and one for win32, and one as a real X window manager etc, it could even be used inside a game GUI. Opinions?

Offline

Board footer

Powered by FluxBB