You are not logged in.

#1 2014-09-15 19:08:36

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 298

[Solved] Saving/forcing Window positions

I can't really find much about this, except for maybe KDE who supports this out of the box.

Is there a way to force certain applications to always open at the same position and disregard any smart placement?

I am using XFCE4 with Openbox. The main offenders are Thunderbird and Firefox.

Thanks in advance!

Last edited by mouseman (2016-01-03 18:33:28)

Offline

#2 2014-09-16 00:03:48

0strodamus
Member
Registered: 2014-01-22
Posts: 96

Re: [Solved] Saving/forcing Window positions

devilspie2 will help.


archlinux | OpenRC | TOMOYO Linux | Xfce

"In his house at R'lyeh dead Cthulhu waits dreaming."

Offline

#3 2014-09-16 00:11:39

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,541
Website

Re: [Solved] Saving/forcing Window positions

Much easier than devilspie would be just to set this via openbox.

Just make an application entry in rc.xml for each of those programs, then specify <position> tags as desired.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Online

#4 2014-09-16 05:17:20

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 298

Re: [Solved] Saving/forcing Window positions

It's great to have options. Thanks guys!

Offline

#5 2015-12-23 10:49:58

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 298

Re: [Solved] Saving/forcing Window positions

For some reason application rules are not working in Openbox.

Window info:

_OB_APP_TYPE(UTF8_STRING) = "normal"
_OB_APP_TITLE(UTF8_STRING) = "Terminal"
_OB_APP_GROUP_CLASS(UTF8_STRING) = "Xfce4-terminal"
_OB_APP_GROUP_NAME(UTF8_STRING) = "xfce4-terminal"
_OB_APP_CLASS(UTF8_STRING) = "Xfce4-terminal"
_OB_APP_NAME(UTF8_STRING) = "xfce4-terminal"
_OB_APP_ROLE(UTF8_STRING) = "xfce4-terminal-1450866927--566053488"

The part in ~/.config/openbox/rc.xml to force xfce4-terminal to the center of the screen:

<application name="Xfce4-terminal">
	<position force="yes">
		<x>center</x>
		<y>center</y>
	</position>
  </application>

I tried numerical values too. I tried quotes around center.

I also tried obapps, the GUI for creating rules. It doesn't work either.

I do a 'openbox --reconfigure' after a change. I tried different names, types, classes and title. Nothing seems to affect the xfce4-terminal window, it continues to be placed where ever openbox deems there is space on the desktop (ie, smart placement).

I'm reading guides and the Openbox wiki, but I'm not sure what I'm doing wrong?

As always, thanks for the help!

Offline

#6 2016-01-02 13:05:30

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 298

Re: [Solved] Saving/forcing Window positions

It works with other windows, but not with xfce-terminal :s

Offline

#7 2016-01-02 16:16:20

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,541
Website

Re: [Solved] Saving/forcing Window positions

mouseman wrote:

I tried different names, types, classes and title.

Did you try all lower case in the name so it matches OB_APP_NAME?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Online

#8 2016-01-03 14:45:59

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 298

Re: [Solved] Saving/forcing Window positions

You know, I thought I did smile.

Sloppy. I hadn't spotted it.

I now changed the xfce4-terminal line to:

<application name="xfce4-terminal" type="normal"><position force="yes"><x>100</x><y>100</y></position>

And it started working.

Thanks!

Offline

Board footer

Powered by FluxBB