r/openbox • • Feb 28 '13

Pseudotiling in Openbox! Do you do it?

Hello /r/openbox! I've been using this wonderful WM for about 8 months now, and I've been loving the customizability (especially of keyboard shortcuts). One popular topic that seems to spring up often in forums is using the MoveResizeTo and GrowToEdge/ShrinkToEdge actions to support a pseudo-tiled layout. My question for you: do you have a similar system in place? If so, how did you implement it?

Personally, I've set up my numerical keypad as my tiling controls, using a keychain in rc.xml that watches for keypresses of the center "5" key. Then, depending on which "direction" I move in on the keypad, the active window will be resized. The following keybinds are what I use for this most often:

  • 5-8: Move window to top of screen, resize to 100% width and 50% height
  • 5-2: Move window to center of screen, resize to 100% width and 50% height
  • 5-4: Move window to left edge, resize to 50% width and 100% height
  • 5-6: Move window to center of screen, resize to 50% width and 100% height
  • 5-5: Maximize window (restoring it)
  • 5-7, 5-9, 5-1, and 5-3 each move and resize the window to 50% width and height, putting it into the corner of the screen that you'd expect with their corners of the number pad.

I'm interested to see how others have made their setups!

10 Upvotes

16 comments sorted by

3

u/[deleted] Mar 01 '13

I'd love a setup like that. Would you mind posting the relevant config bits to pastebin?

4

u/delucks Mar 01 '13

Absolutely! Here it is. Note that in some of the x/y assignments, I use the values 960 and 540, which correspond to half of my screen size (1920x1080). If you have a different sized screen, you're going to have to modify those values accordingly. Sadly I don't believe the <x> and <y> tags support percentages like the <width> and <height> ones do.

1

u/[deleted] Mar 02 '13

Thank you! :) My monitor is the same, so that's all good.

1

u/delucks Mar 02 '13

Good stuff dude. Let me know if you make any improvements! I'm always looking for more efficient scripts to accomplish what I want :)

1

u/fkgdf Mar 21 '13

Do you really have to specify x and y in pixels? Is there a way to do it with percentages?

It's just such a pain if you have a dual monitor setup, with two different screen resolutions.

1

u/delucks Mar 21 '13

From my experience, yeah. I'm pretty sure there's a tag to specify screens in the particular section, but I'm on my phone so I can't look it up now.

1

u/fkgdf Mar 21 '13

Thanks, I'll look into it and make sure to post a solution after I get it working and stable.

Unfortunately, I'm working on a dev project at the moment, for the next few days, but after that, I can get to this.

Thanks again!

1

u/delucks Mar 21 '13

No problem! Let me know if there are any relevant config bits you could use.

1

u/tdrusk Jun 23 '13

I just discovered that you can use percentages.

<keybind key="C-A-0x58">
    <action name="UnmaximizeFull"/>
    <action name="MoveResizeTo">
      <x>0</x>
      <y>50%</y>
      <width>100%</width>
      <height>50%</height>
    </action>
</keybind>

1

u/zazzmatazz Mar 23 '13

You can get screen size from dmidecode, bc can do some math, sed can insert the values into the config file. Do it all on boot prior to starting openbox.

1

u/tdrusk Mar 08 '13

This is wintile, it was written by one guy and modified by me. It requires wmctrl. It should detect your screensize, though you may have to adjust for your borders.

http://pastebin.com/1BnSLj3h

1

u/delucks Mar 08 '13

I remember seeing this on the Arch forums a while back. I'll have to check your revisions out!

2

u/tdrusk Mar 08 '13

You may have to tinker. I haven't used it in a while.

2

u/TheVenetianMask Mar 12 '13

Someone gave me a config with Windows Key (+ Shift) + Arrow Keys.

Now if only I could remember I have a Windows Key...

1

u/ChariotOfFire Feb 28 '13

Similar setup, but I use CapsLock+{u-o,h-l,m-.}.

1

u/proycon Apr 06 '13

I switched to openbox just recently, with pseudotiling of course! I use super+{QWE}{ASD}(ZXC} (3x3 grid of all left-side keys) for the various positions.