You are not logged in.
Alright, so I'm trying to set up my Openbox to have some manual window tiling support similar to Subtle's implementation.
My screen is 1600x900. I have 1 pixel margins all around except for a 41 pixel margin on the East side of the screen.
Here are some of the appropriate parts to my rc.xml:
<keybind key="W-KP_3">
<action name="MoveResizeTo">
<x>-0</x>
<y>-0</y>
<width>458</width>
<height>449</height>
</action>
</keybind>
<keybind key="W-KP_9">
<action name="MoveResizeTo">
<x>-0</x>
<y>+0</y>
<width>458</width>
<height>449</height>
</action>
</keybind>So, if my screen is 900 pixels tall, with 1 pixel margins on top and bottom, that should mean that I have 898 pixels to work with vertically. 898/2=449, so by setting the window the be resized to a height of 449 pixels should mean that the window will take up exactly half of my screen vertically. Unfortunately, it seems that Openbox does not include the titlebar in all of this so when I have two terminal windows. This means that when I have a window set to W-KP_3 and another at W-KP_9 (bottom right and top right), the windows will overlap.
Is there any way to fix this without undecorating my windows?
EDIT: Here's a screenshot of it so you can see the problem. http://i.imgur.com/NYhyj.jpg
Last edited by iimblack (2011-04-10 20:56:56)
Offline
It's just a wee bit of math and a couple of test runs to correct this. Your title bars plus windows borders appear to be 14 to 20 pixels in height. So change your desired height from 449 to 433 (16 pixels difference), test it, and adjust the value up or down from there.
If you are using xterm, the window will not necessarily be the full height you specify. On my display, where I normally don't use window decorations, xterm won't allow a window to include a fraction of a line height. You might want to run your height tests with a different app.
Here's an old shot of my tiling. I deliberately leave a gap between tiles.
Last edited by thisoldman (2011-04-10 19:53:42)
Offline
Remark on terminals: depending upon which one you use, they will have a resize increment option set in the WM_NORMAL_HINTS property. You find out what it is by running this command and clicking on a terminal window:
xprop WM_NORMAL_HINTSIf it's set, then that window can only be resized in those increments.
Some terminal emulators like mrxvt provide an option to turn it off. Most, in my experience, do not. You'd have to modify the source of the terminal emulator to stop it from setting the hint. (I've done just this with lxterminal.)
Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.
Tu ne cede malis sed contra audentior ito
Offline
I am using urxvt. I had figured that I could simply resize the terminal normally because Subtle had no problems resizing the terminal to the same dimensions.
Also, it does seem that urxvt has some issues resizing because of the WM_NORMAL_HINTS. Might try the aur package, I heard it has a patch to disable that.
Anyways, thanks for the help.
Last edited by iimblack (2011-04-10 20:56:43)
Offline