3

Can one somehow instruct openbox about the desired location to open new windows? For example, I have two screens (LVDI, VGA) and would prefer that new windows be opened on VGA, whereas they are always opened on VLDI instead (perhaps because LVDI is listed first among monitors known to X). As another example, I would like to make openbox aware of the position of the conky desktop window so that new windows do not obscure it.

2

Placement of new openbox windows is controlled by the placement section in your openbox configuration (~/.config/openbox/rc.xml):

<placement>
  <policy>Smart</policy>
  <!-- 'Smart' or 'UnderMouse' -->
  <center>yes</center>
  <!-- whether to place windows in the center of the free area found or
       the top left corner -->
  <monitor>Primary</monitor>
  <!-- with Smart placement on a multi-monitor system, try to place new windows
       on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
       the active window is, 'Primary' - only on the primary monitor -->
  <primaryMonitor>1</primaryMonitor>
  <!-- The monitor where Openbox should place popup dialogs such as the
       focus cycling popup, or the desktop switch popup.  It can be an index
       from 1, specifying a particular monitor.  Or it can be one of the
       following: 'Mouse' - where the mouse is, or
                  'Active' - where the active window is -->
</placement>

I would suggest playing around with the primaryMonitor value in particular.

Source: https://icculus.org/pipermail/openbox/2011-December/007413.html


As far as the second part of your question is concerned: Instructing openbox not to obscure specific screen areas and/or application windows is more complicated and would probably entail setting a special window type like dock or panel. From the conky documentation:

own_window_type

if own_window is yes, you may specify type normal, desktop, dock, panel or override (default: normal). Desktop windows are special windows that have no window decorations; are always visible on your desktop; do not appear in your pager or taskbar; and are sticky across all workspaces. Panel windows reserve space along a desktop edge, just like panels and taskbars, preventing maximized windows from overlapping them. The edge is chosen based on the alignment option. Override windows are not under the control of the window manager. Hints are ignored. This type of window can be useful for certain situations.

(highlight mine)

Alternatively you could try setting up margins in your openbox configuration.

  • Thanks, the placement options are what I needed for both questions. As far as conky goes, I want maximized applications to be able to hide it (so I can take advantage of the entire screen when desired), but when new windows are opened, I would prefer that they don't obscure the conky window by default. It seems that the center option in the placement settings of the openbox rc.xml file is the key here. So far as I can currently tell, it only accepts yes/no values, but if one could set it more quantitatively (e.g., 10% in from top left corner), that would be most useful. – user001 Aug 26 '14 at 2:10
  • @user001 Oh, I see. It would certainly be useful to have more fine-grained control over window placement. You could try filing a feature request, but don't expect a quick implementation. Openbox development seems to have slowed down quite a bit, unfortunately. – Glutanimate Aug 26 '14 at 21:16
  • I have used margins to ensure new windows don't end up over my side and bottom pannels. Same for making windows full sized (some applications can still take over whole screen as they should). – anthony Jun 28 at 1:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.