Xfce Wiki

Sub domains
 

Site Tools


Embed

About

This plugin enables the embedding of arbitrary application windows into the Xfce panel. The window is resized into the panel space available, and the associated program can be automatically launched if it is not open.

Example uses include embedding an instant messaging buddy list, a mail client's new mail ticker, a simple media application, or a fancy clock or timer. Combining with Xfce's ability to auto-hide panels can make this very convenient.

Usage

Upon creating the plugin in a panel, the preferences dialog will pop up, where you can set an optional launch command, window selection criteria (if any), label formatting and font, and the plugin size. Hover your mouse over any item for extra information.

The plugin works as follows:

  1. If there are any selection criteria specified, it will search for a window that meets all of the specified criteria.
  2. If no windows are found and criteria were specified, it will start monitoring X11 events to check new windows against the criteria. Regardless of whether or not there are criteria specified, if a launch command is provided, it will launch it at this point (once).
  3. Once a window is found (or a window embeds itself, as is the case with GtkSockets), the original size of the window is captured and stored. This is used when the window is popped out, or if the minimum size is set to 0.
  4. The window is embedded and resized to fill the plugin, as specified.
  5. If the label is to include the title, the window is monitored for title changes.
  6. If the window is destroyed, the plugin returns to step 1.

If you have a label (even if it is just a space), you can left-click it once to change keyboard focus to the embedded window (since panels do not give keyboard focus by default), and double-click it to pop the window out and in. You can do the same along with accessing the plugin preferences in the menu that pops up if you right-click the label.

Examples

The following are some sample configurations. Any selection criteria not mentioned are assumed to be blank, and any specified labels are only suggestions; they can certainly be modified to taste.

  • Embed Pidgin's buddy list:
    • Launch command (optional): pidgin
    • Process name: pidgin
    • Window title: ^Buddy List$
    • You may want to add a gtkrc-2.0 file to your ~/.purple directory to adjust the buddy list colors to match your panel, such as the following for the greybird theme:
style "buddylist_style"
{
    text[NORMAL] = "#ffffff"
    text[PRELIGHT] = "#ffffff"
    base[ACTIVE] = shade(.7,"#686868")
    base[NORMAL] = shade(.7,"#686868")
    bg[ACTIVE] = shade(.7,"#686868")
    bg[NORMAL] = shade(.7,"#686868")
    bg[PRELIGHT] = shade(.7,"#686868")
}
widget "*pidgin_blist*" style "buddylist_style"
  • Embed gvim to edit a notes file:
    • Launch command: gvim –socketid %s ~/path/to/note/file
    • Label format: Notes
  • Embed a terminal:
    • Launch command: xterm -into %s
    • Label format: %t

Screenshots

Embedding Pidgin's buddy list into the panel:

Buddy list embedding configuration dialog Buddy list embedding result

Embedding Claws Mail's new mail ticker into a thin panel (the ticker moves, so the entire author/subject/folder can be read):

Mail ticker embedding configuration dialog Mail ticker embedding result

The label right-click menu:

Right-click menu

The top of an example deskbar panel with a clock, two instances of Genmon, and two embedded windows:

Example deskbar configuration with two embedded windows

Releases

1.4.1 (2013-06-01)

1.4.0 (2013-05-27)

1.2.0 (2012-12-16)

  • Improved painting of the socket background
  • Made the socket background clickable
  • Translations: Arabic, French, Galician, Portugese, Portugese, Spanish, Uyghur
  • Updated license text

http://archive.xfce.org/src/panel-plugins/xfce4-embed-plugin/1.2/xfce4-embed-plugin-1.2.0.tar.bz2

1.0.0 (2012-04-27)

  • Plugin now compiles as a module.
  • Translated into 15 languages!
  • Feature-complete. Have fun!

http://archive.xfce.org/src/panel-plugins/xfce4-embed-plugin/1.0/xfce4-embed-plugin-1.0.0.tar.bz2

0.8.0 (2012-02-05)

Dependencies

  • Xfce 4.8.0
  • GTK+ 2.20

Building and Installing

Nothing special, just the standard ./configure && make && sudo make install

Reporting Bugs

Bugs should be reported to the Xfce bug tracking system.

Open Bugs

Source Code Repository

You can get the bleeding edge (mostly just new/updated translations) through the git repository, via the command

git clone git://git.xfce.org/panel-plugins/xfce4-embed-plugin
projects/panel-plugins/xfce4-embed-plugin.txt · Last modified: 2013/06/01 20:47 by dnschneid