Re: Devilspie (version 0.13 and greater) s-expressions examples
That didn't work either but I've REALLY figured it out now
Code:
(if (matches (application_name) "^.+") and (not matches (window_class) "Gnome-panel" ) (center)))
The first bit matches all windows but also makes the panel open in the centre of the secreen. The second part fixes that. Thought just putting
Code:
(if (not matches (window_class) "Gnome-panel" ) (center))
wouldn't work.
Re: Devilspie (version 0.13 and greater) s-expressions examples
Quote:
Originally Posted by fannymites
That didn't work either but I've REALLY figured it out now
Code:
(if (matches (application_name) "^.+") and (not matches (window_class) "Gnome-panel" ) (center)))
The first bit matches all windows but also makes the panel open in the centre of the secreen. The second part fixes that. Thought just putting
Code:
(if (not matches (window_class) "Gnome-panel" ) (center))
wouldn't work.
Okay I just tried it myself, here is what I noticed:
First I tried . I killed devilspie and started it again. But it kept seg faulting. After some experimentation I decided it was due to the fact windows already existed when it tried to center. So I restarted X.
When I logged into gnome again it worked fine. Devilspie centered everything-- including the panel. I thought that's not really what you wanted so I modified it to:
Code:
(if (not (is (window_class) "Gnome-panel")) (center))
[edit] This is just like yours :) This seems to work now. Just remember to restart X, otherwise devilspie will seg fault. At least for me it did.
What version of devilspie are you using? Was it seg faulting for you before too?
Re: Devilspie (version 0.13 and greater) s-expressions examples
I'm using version 0.16-1 on dapper.
Yes, I get the seg faults too but I'm getting them with a few apps on dapper at the moment and I did notice that I need to restart X to see the results of my fiddling.
still doesn't do anything at all for me but the other code you posted does.
Also, I tried the one I said didn't work -
Code:
(if (not matches (window_class) "Gnome-panel") (center))
does actually work. I can only assume I made a typo the first time I tried it.
So, to sum up and remove any confusion for anyone that might be searching the forums (as I did for ages), to open all windows in the centre of the screen when using gnome/metacity -
Code:
(if (not matches (window_class) "Gnome-panel") (center))
or
Code:
(if (not (is (window_class) "Gnome-panel")) (center))
Re: Devilspie (version 0.13 and greater) s-expressions examples
I'm trying to make the terminal open in a certain spot, but when I use geometry with say, "+30+40", the terminal is unaffected. I can use the geometry command to change the window size, but I can't change the offset. I even tried to use the center command, but it doesn't do anything. Any ideas?
Re: Devilspie (version 0.13 and greater) s-expressions examples
Quote:
Originally Posted by souled
I'm trying to make the terminal open in a certain spot, but when I use geometry with say, "+30+40", the terminal is unaffected. I can use the geometry command to change the window size, but I can't change the offset. I even tried to use the center command, but it doesn't do anything. Any ideas?
Not sure how to do this with devilspie, I haven't been able to get the gnome-terminal to match. What you can do is modify the terminal command. It will accept the --geometry option. So to open it "+30+40", you would change 'gnome-terminal' to 'gnome-terminal --geometry=+30+40'. Let me know if you ever figure out how to do it in devilspie, I would be interested.
Re: Devilspie (version 0.13 and greater) s-expressions examples
Hmm... Well I got it to work. Basically the terminal is hard to match because of the dynamically set title. You have to disable the dynamically set title to make it stay constant. I just name mine "Terminal." This allows me to use application_ name "Terminal" to match it. I just tried puting the center command in a file separate from my main terminal expression, and it works... I don't understand why this is, but whatever. It works!
Re: Devilspie (version 0.13 and greater) s-expressions examples
i installed devilspie and it seems to work: i've got a debug.ds in ~/.devilspie, when devilspie is run from the terminal it shows the debug output.
However, i tried adding a firefox.ds with:
Code:
(if (is (application_name) "Firefox") (set_workspace 2))
but that doesn't work. Tried it with several other applications using the debug info provided, but i can't get them to work either. Even examples provided in wiki's don't work for me. What am i doing wrong?
Re: Devilspie (version 0.13 and greater) s-expressions examples
Quote:
Originally Posted by
JurB
i installed devilspie and it seems to work: i've got a debug.ds in ~/.devilspie, when devilspie is run from the terminal it shows the debug output.
However, i tried adding a firefox.ds with:
Code:
(if (is (application_name) "Firefox") (set_workspace 2))
but that doesn't work. Tried it with several other applications using the debug info provided, but i can't get them to work either. Even examples provided in wiki's don't work for me. What am i doing wrong?
After adding the .ds file to ~/.devilspie do you restart devilspie?
Re: Devilspie (version 0.13 and greater) s-expressions examples
Yes, i did... even killall devilspie to be sure.
But, i've solved it now: apparently every instance of Firefox had to be closed in order for things to kick in.
Re: Devilspie (version 0.13 and greater) s-expressions examples
Hi. A question. Does this work with wm`s other than metacity?