You are not logged in.

#1 2005-07-27 03:46:32

Todd_Z
Member
From: MA, USA
Registered: 2005-01-31
Posts: 35
Website

Window properties

I want to create a function in my .bashrc that when i type the cmd, all the gaim windows become the same default size, and are aligned on the screen according to the amount of windows open.  How do I get the object reference for the windows and change the values such as width, height, x, y?   Thanks.

Offline

#2 2005-07-27 04:30:32

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Window properties

you can use xwininfo to get the window info.

Offline

#3 2005-07-27 04:42:04

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Window properties

Todd_Z wrote:

I want to create a function in my .bashrc that when i type the cmd, all the gaim windows become the same default size, and are aligned on the screen according to the amount of windows open.  How do I get the object reference for the windows and change the values such as width, height, x, y?   Thanks.

You can't do that in bash... you'll need something like python-xlib

Offline

#4 2005-07-27 17:55:04

Todd_Z
Member
From: MA, USA
Registered: 2005-01-31
Posts: 35
Website

Re: Window properties

xwininfo can get me the information, but can i alter the properties with it?  If i cant, how can i?  Is there a more up-to-date python-xlib-like thing to use for this?  phython-xlib seems very out of date

Offline

#5 2005-07-27 18:34:34

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Window properties

Todd_Z wrote:

xwininfo can get me the information, but can i alter the properties with it?  If i cant, how can i?  Is there a more up-to-date python-xlib-like thing to use for this?  phython-xlib seems very out of date

I bet there's a program with x you can use to modify geometry of windows. Maybe xset can manipulate geometries...

We've been talking about python-xlib. Though it is out of date, it is apparently quite stable. The X protocol doesn't change much, so I guess python-xlib doesn't need to either. It would certainly suffice for your goals.

Dusty

Offline

#6 2005-07-27 19:42:01

Todd_Z
Member
From: MA, USA
Registered: 2005-01-31
Posts: 35
Website

Re: Window properties

I'm new to all this linux progging, are there any tips to be given or tutorials for me to be directed to?  My programming experience is mostly php and java.

Offline

#7 2005-07-27 20:32:56

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Window properties

um... well if you're going to try python, start here:
http://www.python.org/doc/2.4.1/tut/tut.html

If you can do Java and PHP, you shouldn't have much trouble with Python... Python is like Java or PHP but without all the ugly crap.

I don't know anything about window management though, so I can't give you a tutorial on that.

Dusty

Offline

#8 2005-07-27 22:05:53

Todd_Z
Member
From: MA, USA
Registered: 2005-01-31
Posts: 35
Website

Re: Window properties

Yea, actually i had a job last year that required me to learn python, so I'm alright there - it was more the other end of things that i need help.  But thanks

Offline

#9 2005-07-27 22:13:41

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Window properties

Hmm... I guess if you check the sources for the python-xlib it'll tell you a lot (Python doesn't need documentation cause its so readable... at least, that's the theory). If its got docstrings, you can use python's onboard help module to read them.

Dusty

Offline

#10 2005-07-28 04:26:28

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Window properties

pypanel uses python-xlib, if you need examples - also, the calls are almost identical to their C counterparts (on purpose)

Offline

Board footer

Powered by FluxBB