Help:Upgrading to 3.4

From Openbox

(Difference between revisions)
Jump to: navigation, search
(MoveFromEdge actions)
Line 320: Line 320:
  
 
=== MoveFromEdge actions ===
 
=== MoveFromEdge actions ===
<big><big>'''I don't really know what this means, can someone fill it in please'''</big></big>
 
 
 
Add MoveFromEdge* actions corresponding to MoveToEdge* but aligns far edges instead of near edges, so if you have two overlapping windows you can easily put them side by side.
 
Add MoveFromEdge* actions corresponding to MoveToEdge* but aligns far edges instead of near edges, so if you have two overlapping windows you can easily put them side by side.
 +
 +
[[Image:MoveFromEdge.png]]
  
 
=== Moving maximized windows ===
 
=== Moving maximized windows ===

Revision as of 16:29, 20 May 2007

There are a huge number of improvements and changes made in Openbox 3.4. This guide goes through all these changes and what they mean for users and themers.

Contents

The "I don't have time give me something fast" approach

There are a number of new things that you won't be able to take advantage of without updating your configuration file. One quick and easy way to get these features is to just delete your ~/.config/openbox/rc.xml configuration file and set your config back up from there with Obconf or by hand.

What's new in version 3.4 ?

Our getting started guide is a great place to start learning the best ways to start an Openbox session. If you've been running a previous version of Openbox, you can keep using the methods you have been and everything will work, but there are also some new features that you may wish to take advantage of, especially in terms of how you log into or run an Openbox session.

During the development cycle for Openbox 3.4, we fixed and closed every bug listed in the bug tracker from previous versions. There's a big list of the bugs in the Openbox:Changelog, and we're not going to go through them all here. We're going to talk about the new things.

Menus

Combined client list menu

(thumbnail)
The combined client list menu

We've added a new client list menu. Instead of having a submenu for each desktop, it combines all your desktops into one menu. This menu is used by middle click on the desktop in the default configuration.

To show this menu, put the following into a keyboard or mouse binding:

<action name="ShowMenu"><menu>client-list-combined-menu</menu></action>

For example, from the default configuration:

<mousebind button="Middle" action="Press">
  <action name="ShowMenu"><menu>client-list-combined-menu</menu></action>
</mousebind>

Iconified windows in the client list menus

Iconified windows in the client list menus used to be shown below a separator. In Openbox 3.4 we have gotten rid of the visual clutter created by that separator.

Instead, iconified windows will always appear at the bottom of the list and will be surround with brackets. You can see, for example, that Kaffeine Player is iconified in the picture of the combined client list menu.

Keyboard accelerators (using letters instead of arrows)

Wouldn't it be nice if you could just hit a letter to instantly choose the item you wanted in your menus? Now you can!

In the new client menu, the shortcuts are highlighted with an underline. In other menus, underlines are not used, instead you can just press the first letter of a menu item to jump to it. If there are multiple entries with the same letter, press it again to go to the second one.

If the first letter of a menu entry is not an ASCII alpha-numeric character, then the first such character will be used as the shortcut for that entry, and it will be underlined.

Now you can navigate your menus at light speed.

No more menu titles

We've had a large number of requests from users who wanted to get rid of the titles at the top of their menus. So instead of just letting you turn them on and off, we decided you give you a whole range of flexibility.

Menus no longer have titles. So if you don't want a title, you don't need one. But in their place you can now put headers (which look like the old titles) anywhere you want in your menu. In the picture of the combined client list menu above, there is a header for each desktop. You can do the same to separate sections of your own menus.

The default menu that comes with Openbox puts a header at the top of the menu, so it looks like the old menu title used to. Just remove the separator item from the menu and it will no longer have a title.

You put these headers in your menu by using separators, but with a label attribute, such as:

<menu id="root-menu" label="Openbox 3">
  <separator label="Openbox" />
</menu>

Startup notification

(thumbnail)
Startup notification at work. Kicker is showing that Ktorrent is starting up.

Now when you run things from Openbox menus, you can enable startup notification. This means that if you have a tasklist or some other program that visually displays when applications are starting, it can work from Openbox menus too.

It is, however, disabled by default because it shouldn't be used with just anything. If you use it with an older terminal program, anything you launch from the terminal will be given an old timestamp. One way to fix that is to run unset DESKTOP_STARTUP_ID in your shell startup. You also should not use it for commands that don't create a window on screen, because without a window being created, nothing will know when the command finished running.

To make use startup notification when launching a program use something like the following in your menu:

<item label="Calculator">
  <action name="Execute">
    <startupnotify>
      <enabled>yes</enabled>
      <name>Calculator</name>
      <icon>gnome-calc2</icon>
    </startupnotify>
    <execute>gnome-calculator</execute>
  </action>
</item>

If you don't specify a <name> or <icon> field, they are derived from the command that is being executed.

If the application starts, and the notification doesn't go away, that means you shouldn't use it for that application. Any GNOME or KDE application will support startup notification by default.

You can also use this startup notification when launching applications with key bindings, in the same way.


fix broken links



The new startup notification feature is also mentioned in the usability section, and the configuration section.

New client menu

(thumbnail)
The new client menu

The client menu is the menu you get when you right click on an application's title bar or click its icon (in the default configuration).

The client menu has been restructured, revamped, and improved for Openbox 3.4. You can see in the picture to the right, the new structure of the menu. It's cleaner and easier to get to the item you want.

In addition, you can now use keyboard accelerators to navigate the menu.

As well, when you use a keyboard shortcut (Alt-space in the default configuration) to bring up the menu, it will now pop up at the top left corner of the window, rather than wherever your mouse pointer happens to be at the time. You can see that happening in the picture also.

We've tried our best to make meaningful, unique keyboard shortcuts for all the current translations of Openbox also, but any improvements would be appreciated.

Selecting disabled menu items

Disabled menu entries in the client menu can now be selected with the mouse or the keyboard. Visually, this is a lot nicer feeling, when you move the mouse around and the selected entry doesn't just disappear.

This also has the added bonus that no matter what entries in the menu are enabled or disabled, the same number of arrow keys or letter keys will always take you to the same entry. Yay for consistent behavior.

Menu placement

When you opened a menu close to the edge of the screen, opening sub-menus used to push the whole menu back from the edge of the screen, which could be jarring and make navigation difficult.

In Openbox 3.4, menus are always placed on screen such that they won't have to move afterward. Sub-menus are opened cleverly to the side with room available, so that the menus behave in a more predictable manner.

Large menus

(thumbnail)
The new "More..." sub-menu

Menus that are bigger than your screen is tall are no longer a problem for Openbox. When a menu grows too large, it will be split off into a sub-menu at the bottom titled "More...". You can see an example in the figure to the right.

Usability

New "Alt-Tab" dialog

(thumbnail)
The new focus cycling dialog

Openbox 3.4 sports a brand new dialog for cycling between windows. This new dialog shows icons for all windows you can switch to instead of just showing the icon for the current target. You can see the new dialog in action to the right.

The dialog shows when you use press the Alt-Tab or Alt-Shift-Tab keys in the default configuration.

Faster than ever

Openbox has always been fast, but version 3.4 is faster than any before it. A large number of improvements were made throughout the code that impact directly on how fast Openbox can do what it does. A couple examples would be the window stacking code (how Openbox determines which windows to put on top of which) and our use of lists.

More reliable

It's starting to sound like a Microsoft Windows ad, but in Openbox 3.4 we cleaned up a huge number of bug reports which had been sent in since the last release. We also changed and rewrote a number of sections to improve their reliability, such as the focus handling and session manager interaction.

openbox-session and the graphical log-in

When logging in through KDM, GDM or some other graphical log-in system, you no longer have to set up a ~/.xsession file to get a usable Openbox session. You can select the "Openbox" entry in the Session Type menu, and support for various applications, as well as SCIM are automatically included in your log in. The openbox-session provides these same capabilities from the command line. See the autostart documentation to see how Openbox does this, and how to launch your own choice applications along with Openbox when you log in.

SCIM support

When you run Openbox without a desktop environment, the default Openbox session will now run with SCIM support, if you have SCIM installed. You can see the autostart documentation for more details about this.

Language support

Openbox now uses Pango exclusively for its font rendering, which means better support for displaying text from all languages.

This change allowed us to clean up the font rendering code a lot, and we've sped up the drawing routines significantly from previous Openbox versions.

Transparent windows

(thumbnail)
Openbox managing a window which uses true 32-bit transparency

Windows that use the new 32-bit true transparency provided by x.org servers are now supported by Openbox. You can see an example of urxvt running with true transparency in the picture to the right.

Keeping windows on screen

When windows adjust their dimensions, Openbox now takes care to make sure they don't end up off of the screen, unless the application explicitly requests it. This keeps your desktop more usable, meaning you don't have to move windows around to use them so much, without interfering with letting you move windows outside the screen if you want to, like some other window managers do.

Improved startup notification

(thumbnail)
Startup notification at work. Kicker is showing that Ktorrent is starting up.

Openbox can now use startup notification when launching programs. This means that when the application's window appears, Openbox will know when you began launching the program, and what desktop you were launching it on. It also means that other programs, such as taskbars, can show feedback that an application is starting.

The menu section talks about how to use startup notification in your menus and key bindings.

Using startup notification for your menu entries also helps with focus stealing prevention. If you use it, then Openbox can keep the launching application's new window from stealing focus in the middle of your typing (and sending your password off to IRC for example).

NewBusyCursor.png

Openbox used to use the "watch" icon from the core X cursors when a program was starting up, which is a very hard to use. This has been changed in 3.4 so that the startup notification stays out of your way. If you use an Xcursors theme, Openbox will use the busy cursor with an arrow, an example of which can be seen to the left. And if you don't use an Xcursor theme, it won't change your cursor at all.

Running applications remotely

(thumbnail)
Openbox showing the application's host machine

If you run applications from another machine in your X session, Openbox will now display their host machine in the window's titlebar, as you can see in the image to the right.

Improved support for multiple screens

If you have a multi-monitor setup, either with Xinerama (a.k.a. Twin View) or with independent screens, Openbox 3.4 has improved support for your setup.

Input focus handling has been made more robust all around in version 3.4, but especially with multiple screens in mind. Openbox will no longer steal focus from other screens and you can click on the root window to give focus to a particular screen, with a mouse binding. The default configuration lets you focus a screen by clicking on the desktop with your Left mouse button.

Window placement between Xinerama (a.k.a. Twin View) monitors has also been improved. New windows will appear on the same monitor as other windows they are related to. If they don't have related windows then they are placed where the input focus is, or where the mouse pointer is.

Complete support for latest EWMH

Openbox 3.4 sports complete support for the latest freedesktop.org EWMH specification (version 1.4-draft2), as well as even some hints which will be in a future release!

This means that the latest features from applications will have full support from Openbox.

8-bit TrueColor support

Environments such as VNC are often used in 8-bit display mode to reduce the network bandwidth they require. VNC uses an 8-bit display mode called "TrueColor", which previous versions of Openbox did not support. As of version 3.4 you can use Openbox in these 8-bit TrueColor environments, rather than forcing you to use the old "pseudocolor" paradigm. This means that 8-bit VNC will work out of the box now.

Legacy fullscreen applications

Openbox can now detect when applications are trying to be fullscreen, even when they don't use the EWMH fullscreen hints. This means that applications, such as VLC (Video LAN Client) in fullscreen mode won't be covered by panels or other windows.

Windows on "all desktops"

Omnipresent windows, or windows which are present across all desktops, have had their behavior improved in Openbox 3.4. When changing desktops, these windows will no longer "steal" focus and hold onto it.

Maximized terminal windows

Applications which resize in increments, such as x terminals have been made to full the screen properly when they are maximized. This means that when the window is maximized, you will no longer have a little margin at the edge of the screen, where you can click and miss the window. Some older terminal clients may not know what to do when they are resized outside of their increments, but most will already work fine, such as xterm, rxvt-unicode, and gnome-terminal.

Focus cycling to panels and desktop windows

(thumbnail)
Focus cycling to a panel

New options have been added to the focus cycling actions to allow you to cycle between panels and desktop windows. You can use Control-Alt-Tab to access this feature in the default configuration. You can use these options with the traditional focus cycling behavior or with the directional focus cycling.

fix broken link

See the configuration section for details on how to set this up in your own key bindings.

Session saving and restoring

Session saving and restoring has been revamped and improved in version 3.4.

Clients which do not use the session management protocol can now be saved and restored. This applies to programs like rxvt-unicode, Firefox, and probably most applications which are not GNOME or KDE based.

Ksmserver (KDE's session manager) allows the window manager to be more precise in saving the session state. Openbox 3.4 takes advantage of this feature to improve session saving within KDE.

Cycling across all desktops

(thumbnail)
Focus cycling across all desktops

An option has been added to allow you to focus cycle between windows on all of your desktops. This is not enabled in the default configuration, but you can easily add the <allDesktops> option to your NextWindow and PreviousWindow actions to enable this behavior. For example, to get this behavior in the default configuration you would change the Alt-Tab and Alt-Shift-Tab key bindings to this:

  <keybind key="A-Tab">
    <action name="NextWindow"><allDesktops>yes</allDesktops></action>
  </keybind>
  <keybind key="A-S-Tab">
    <action name="PreviousWindow"><allDesktops>yes</allDesktops></action>
  </keybind>

When you use this, the desktop which the window is on is appended to the window's title in the cycling dialog, as you can see in the image to the right.

fix broken link'

This is also mentioned in the configuration section.

Laptop power friendly

Openbox 3.4 adds support for the _NET_WM_USER_TIME_WINDOW hint from the freedesktop.org EWMH. You don't need to know details, but this means that Openbox provides an environment where your desktop applications can wake up less often - which means less power consumption.

Desktop cycling dialog

The desktop cycling dialog's behavior has been changed. It will no longer switch desktops immediately while the dialog is being shown. This may or may not be something which you like, but it is necessary at the moment for many applications, such as Firefox. You can see the nitty gritty details as to why here. But this change, along with some others, means that applications will know when they do and don't have focus at all times, which will make them work properly, which we think is a good thing.

The dialog is shown when switching desktops with the Control-Alt-Left and Control-Alt-Right keys in the default setup. If you want the desktop to change immediately when you use these keys, you can turn off the dialog in the key bindings, such as:

  <keybind key="C-A-Left">
    <action name="DesktopLeft"><dialog>no</dialog></action>
  </keybind>
  <keybind key="C-A-Right">
    <action name="DesktopRight"><dialog>no</dialog></action>
  </keybind>

Animated iconify and restore

A simple animation has been added for when windows are iconified or restored to visually display where the window has been iconified.

You can watch this Video.png video showing the animation (in ogg format), to have an idea of what it looks like. The animation is very fast, so the video can only capture so much.

The animation is quick and not resource intensive. But if you prefer to have your windows instantly appear and disappear, rather than animate, you can use the <animateIconify>no</animateIconify> option in the <theme> section of your configuration file.

Focus aware applications

Some applications like to track when they are focused or not, or which of their windows is focused. Instant Messengers often do this, so that it can alert you when a message comes and the window is not focused. Firefox also uses these same mechanisms to tell which window the user is working with.

Openbox 3.4 takes special care to make sure that applications always know when their windows gain and lose focus. We mentioned one way that we go about this in the [#Desktop cycling dialog] section.

Right now the standards and coordination for this between window managers and applications is non-existent, so Openbox takes every precaution it can to make sure that every application will work right.

Resizing on the window's edges

Resizing grips have been added to all edges of your windows. These are especially noticeable along the top edge of the titlebar, and in the top-left and top-right corners. This makes resizing windows easier and faster with just the mouse.

You can also resize along the bottom and side edges of the window, though in most themes the sides are only a 1 pixel border, which can be hard to click on.

If you undecorate a window (an option in the client menu), by default the windows are given just a border. This border can now also be used to resize the window.

fix broken link

In order to take advantage of these new resizing areas, however, you need to have bindings for them in your configuration file. They are all used in the default configuration. See the configuration section for what to add to your own configuration to get these to work for you.

Windows without icons

(thumbnail)
The default icon at work. The task list, Openbox and everyone else can agree for once.

Some applications don't set an icon on their window. Generally, every application which would show the window's icon will choose some icon of its own in this case. So Openbox would show one thing, your task bar a different icon, and maybe your pager would show a third icon, all for the same window.

Starting in Openbox 3.4, when a window does not provide any icon of its own, Openbox will set its icon to a default "window" icon, so that applications can agree on what to display for the window.

Synchronized window resizing

If your application supports it, Openbox 3.4 will synchronize its resizing with the application to avoid excessive flicker.

You can, as always, also choose to have the application window not resized until you have finished resizing the frame with the <drawContents>no</drawContents> in the <resize> section of your configuration file.

Improved "Show Desktop"

Many panels provide a button to "show your desktop". Openbox also provides this functionality through the Windows-D 1 key binding in the default configuration.

Key chain dialog

(thumbnail)
The new key chain dialog, showing the first key sequence of a key chain

Openbox has supported emacs-style key chains for a long time. However, new in 3.4 is a small popup dialog that visually shows you where you are in your key chain's sequence.

The dialog is small and shows up in the top left corner of your screen after a small delay. So if you go through your key chains without too much waiting, you might never see it.

Chroot key chains and key quoting

Openbox 3.4 introduces the ability to "chroot" your keychains. This means that when you enter a chroot section of your key chain, Openbox will not leave the keychain automatically, and when you use keys further along the chain, it will stay within the chroot.

There are a number of examples of how this could be used, so you can get a better idea. You could use this to use the arrow keys to change desktops, for instance. A key chain setup such as:

  <keybind key="C-A-d" chroot="true">                                           
    <keybind key="Up"><action name="DesktopUp"><dialog>no</dialog></action></keybind>                 
    <keybind key="Down"><action name="DesktopDown"><dialog>no</dialog></action></keybind>                 
    <keybind key="Left"><action name="DesktopLeft"><dialog>no</dialog></action></keybind>                 
    <keybind key="Right"><action name="DesktopRight"><dialog>no</dialog></action></keybind>                 
    <keybind key="Escape"><action name="BreakChroot"/></keybind>              
  </keybind>

This key chain would mean that when you pressed and released Control-Alt-D, you would enter a chroot. From then on, other key bindings would not function, but the Arrow keys by themselves would move your around your desktops. Pressing Escape or Control-G (in the default configuration) would take you back out of the chroot and return your key bindings to normal.

Another use for chroots is "key quoting". This is used when you run an Openbox session in a window, such as a VNC client. In order to use key bindings inside the VNC, generally, you have to make sure that they are different from the ones in your main Openbox session.

With key quoting, you can use the same key bindings in both. Here's an example:

  <keybind key="C-A-q" chroot="true">
    <keybind key="C-A-q"><action name="BreakChroot"/></keybind>
  </keybind>

With this example, when you pressed Control-Alt-Q, Openbox would enter the chroot. Then your normal Openbox key bindings would stop working and would instead be passed through to the VNC session (assuming you have it focused). When you were done, you could press Control-Alt-Q again, and your normal key bindings would be restored in you main Openbox session.

The BreakChroot action is also new, and is just for breaking out of a chroot. The global <chainQuitKey> can also be used for this. However, the BreakChroot action is special in that it will only break out of 'one' chroot. So, if you have nested chroots, you can break out of only as many as you want, by placing 1 or more BreakChroot actions in a key binding.

Auto-hiding decorations

(thumbnail)
The maximize button has been hidden for this dialog. Using a "NLMC" titleLayout.

In Openbox 3.4 titlebar buttons can hide automatically. This is done in such a way that they only hide if hiding won't move other buttons around. This way you always know where to click to do the same thing, but when possible, the buttons can be hidden to reduce clutter.

Fix broken link

We've removed the <hideDisabled> option from the <theme> section of the configuration file in favour of this auto-hiding. This is also mentioned in the configuration section.

The bottom handle is also hidden automatically now for windows that can't be resized, making their decorations cleaner and simpler.

MoveFromEdge actions

Add MoveFromEdge* actions corresponding to MoveToEdge* but aligns far edges instead of near edges, so if you have two overlapping windows you can easily put them side by side.

MoveFromEdge.png

Moving maximized windows

If you have a multi-monitor system using Xinerama (a.k.a. TwinView), you can now move maximized windows between your monitors without unmaximizing them first. With the default configuration, just grab the titlebar and drag to the other monitor, and the window will move there.

Activate windows that raise themselves

Some applications still use old protocols to only raise themselves when they want attention, rather than properly asking for attention. One great example of this is Firefox. As of version 3.4, when an application raises itself, Openbox takes that as a queue that the application wants to be activated, and so it will also activate the window.

Please note that the "Firefox raising itself but not requesting focus" problem has been such an annoyance that some distributions, such as Debian and Ubuntu, package a version of Firefox which has had its self-raising code removed. However this means that when you click a link in an external program, the browser window doesn't do anything to help you activate it.

If you use Firefox straight from mozilla.org in Openbox, clicking links in external applications will bring the Firefox window to the front and activate it.

Root context for mouse bindings

A new "Root" context has been added for mouse bindings. This context is for bindings on your desktop which you want to only function when you aren't using some program to display icons on your desktop.

Generally this context is only used for showing root window menus. This way, in the default configuration, when you have a desktop window in place with icons (such as in GNOME or KDE), right clicking will bring up the context menu for the desktop. And when you don't, right clicking will bring up the Openbox root menu.

You can move the menu bindings from the "Root" context to the "Desktop" context in your configuration file to have them work for both cases, if you want to override the menus provided by the desktop icons.


  • new Root context, for if you want something to only work if there is no desktop window (like nautilus or kdesktop or rox desktop) in the way. desktop context still applies to the root window too.
  • handle X server's clock going backwards, without locking up. sometimes the server can still lock up though, not recommended to do this!
  • better handling of window types (click focus docks and stuff)
    • utility windows move with the main windows
  • focus stealing prevention is the bomb
  • more reliable focus handling? seems to lose it sometimes still/again..
  • smarter subdivision of windows into 9 sections for resizing
  • better support for programs that are on more than one desktop (multiple firefox windows for example)
  • desktop setup is only changed on startup, so as to not overwrite settings from other apps like pagers
  • KDE/Openbox and GNOME/Openbox options for display manager GDM/KDM. Use openbox-gnome-session and openbox-kde-session to run a GNOME/KDE session with Openbox.


1 The default bindings for the "Windows" key may not work with your "Windows" key (if you have one), depending on your setup. Technically, the binding is made to the "Super" modifier key, but most distributions bind the "Super" key to the "Windows" key on 104-key PC keyboards.

Themes

  • improvements in the distributed themes
  • add new Clearlooks and Clearlooks-Olive themes by John McKnight
  • (link FONTS) fonts no longer loaded from theme.. load from the rc.xml config file.
    • shadows are still loaded from the theme though
  • distributed theme names have been renamed with Capitalization
  • menu.items.activedisabled.text.color
  • menu.border.color
  • window.active.border.color
  • window.inactive.border.color (note that globbing might set these properties when you didnt mean to)
  • menu.border.width
  • guarantee that titlebar buttons are even sized, so even sized icons (button masks) will be centered
  • default xbms in /usr/share/doc/openbox

Config File

  • (link RESIZE) new mouse binding contexts Left, Right, TLCorner, TRCorner and Top. These need bindings in config file to be useful. Also new context Bottom which is synonym for Handle.
  • (link FONTS) fonts no longer loaded from theme.. load from the rc.xml config file.
    • activeiwndow inactivewindow, menuheader, menuitem, onscreendisplay
  • (link PANELS) add <panels> and <desktop> options to NextWindow PreviousWindow NextWindowNorth etc..
  • (link CHROOT) chrooting for key chains
    • new BreakChroot action to break out of the current chroot
  • W is no longer for Mod4.. it is for Super. which is usually bound to mod4. xmodmap for details.
  • (link ALLDESK) add <allDesktops> option to NextWindow and PreviousWindow. the desktop name will be shown in the focus cycling popup
  • the per-app setting <head> has been renamed to <monitor>
  • can use "default" for any thing in per-app settings
  • (link BUTTONS) titlebar buttons autohide (removed the option from config file)
  • removed "edges_hit_layers_below" option

Extra stuff

  • --reconfigure command line
  • --restart command line
Personal tools