SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-09-19 18:09:46

384403
#! Member
Registered: 2012-03-29
Posts: 50

openbox window size

Is there a way to specify the size of a window in openbox? I'm interested mostly because of Rox-filer. I've set up some keyboard shortcuts to resize windows, like this:

    <keybind key="W-KP_1">
      <action name="MoveResizeTo">
        <x>0</x>
        <y>377</y>
        <width>598</width>
        <height>374</height>
      </action>
    </keybind>

But is there a way to open it by default at that size?

Offline

Be excellent to each other!

#2 2012-09-19 19:08:24

384403
#! Member
Registered: 2012-03-29
Posts: 50

Re: openbox window size

I've played a little with it and I came up with something funny. I've put Rox-filer at startup and I've put the keyboard shortcut for size and position with sleep in autostart.sh, it looks like this:

rox &
(sleep 2s && xdotool key super+o) &

It works fine, but it looks funny when it starts, because it jumps from one place to another. smile

Offline

#3 2012-09-20 10:04:29

joek
#! Junkie
Registered: 2011-09-06
Posts: 495

Re: openbox window size

Okay, I originally thought that you could do this with the per-application settings part of rc.xml, however it doesn't seem like this is possible. You could set Rox-filer to always open in fullscreen using this option, but not with a customisable size.
You could set a hotkey to do what your autostart file does, somewhat like this:

<keybind key="W-f">
  <action name="Execute">
    <execute>rox-filer</execute>
  </action>
  <action name="UnmaximizeFull"/>
  <action name="MoveResizeTo">
    <x>0</x>
    <y>377</y>
    <width>598</width>
    <height>374</height>
  </action>
</keybind>

However, this doesn't quite work, as it changes the size of the window focused, rather than the new window.
If I can come up with something better, I'll let you know.

Offline

#4 2012-09-20 10:27:43

daks
Member
Registered: 2011-06-01
Posts: 24

Re: openbox window size

Offline

#5 2012-09-20 17:10:14

384403
#! Member
Registered: 2012-03-29
Posts: 50

Re: openbox window size

Thank you, it works great, but I wish openbox had this feature.

Offline

#6 2012-10-03 06:23:11

384403
#! Member
Registered: 2012-03-29
Posts: 50

Re: openbox window size

This feature has been recently added to openbox. I've made a .deb file with the latest changes. Whoever wants it can find it here (source here), but I'm warning you that I'm not good at this, as I don't have any experience with packaging. Anyway, specifying the window size now works with the arguments:

    <application class="Rox">
      <size>
    <width>598</width>
    <height>374</height>
      </size>
    </application>

I get a conflict with libobt0, so I can't install obconf, but that's fine with me. I think the reason is that I've compiled it into a single deb file.

Last edited by 384403 (2012-10-03 06:29:09)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo