How does one add an application to the LXDE Panel? I'm using version 0.5.8 on Lubuntu 11.10
How does one add an application to the LXDE Panel
lxde
Related Solutions
The applet for the Battery Monitor plugin does not use a simple icon. It draws a 2D vector graphic using the Cairo library. You can only edit the panel item's appearance within the limits provided by the plugin, which does not currently include an option for replacing it with an icon.
It's normal that themes do not affect this panel item's appearance because, afaik, editing the package's source at lxpanel-<version>/plugins/batt/batt.c
and installing your new custom version is the only way to make dramatic changes beyond what the plugin's settings currently allow for. Alternatively, you would have to find a different battery monitor plugin or write your own if you want to see any major changes here.
Editing Battery Monitor's Appearance Settings:
Editing the file ~/config/lxpanel/LXDE/panels/panel.config
directly does not immediately update or refresh the appearance of the battery monitor panel item.
Instead, right-click the battery monitor applet and select "Battery Monitor" Settings
(where you'll notice it's actually two ugly green rectangles). The plugin should apply the new configuration and update the display of the widget upon closing this window.
Using a Different Plugin:
Some plugins, such as the GNOME Power Manager, can be themed by use of static icon images. From the officieal GNOME Power Manager project site:
The notification icon can display a device in the tray. The icons can be themed with custom icons for each theme, or fallback to a standard default.
This should allow you to use your theme's icons. Install it with apt-get.
apt-get install gnome-power-manager
You may or may not need to manually add @gnome-power-manager
to your /etc/xdg/lxsession/LXDE/autostart file. If you have any problems, please create a new question that pertains to Gnome Power Manager specifically.
Writing your own battery monitor plugin:
The details of writing your own plugin are beyond the scope of this question, but for those interested and willing to code a bit, see How to write plugins for LXPanel - LXDE.org and Debian - How to monitor battery capacity. As mentioned before, the battery monitor plugin included with the lxde-common package relies on the Cairo library. A good tutorial for working with that can be found at Cairo graphics tutorial.
The bounty requests: "Looking for an answer drawing from credible and/or official sources."
I am looking at the source for this plugin from lxpanel-0.7.1 downloaded at LXDE - Lightweight X Desktop Environment - Browse /LXPanel (desktop panel) at SourceForge.net
Yes, something like it currently exists, but it is not the same resize grip in the corner that is used in gtk themes. Something like that would need to be coded into openbox.
Add a Handle
In your themerc for the theme you are using, you can set window.handle.width
to a number of pixels and handle will appear below the window1. The handle includes diagonal resizing tools in the left and right corners. Unfortunately, this method does take up a bit more real estate than the gtk style corner grip.
For example, in your themerc, this would create a 6 pixel wide handle:
window.handle.width: 6
Specifies the size of the window handle. The window handle is the piece of decorations on the bottom of windows. A value of 0 means that no handle is shown.
To activate changes made to the theme, run openbox --reconfigure
.
Change Border Width
You may also change the border.width
setting in your themerc to make the window border wider. This increases the area you can drag, but also increases the visual border of the window, so again you are sacrificing screen real estate which sucks.
Drag with Alt + Right-Click
You can position the cursor anywhere over the window, hold the Alt key and hold the right mouse button to resize the nearest window edge. This includes corners. The only downside here is that this requires a two hand operation. You may be able to create a custom key binding that is preferred.
The mouse binding for resizing is in ~/.config/openbox/rc.xml
or whichever the appropriate rc file is in the ~/.config/openbox/
directory and looks like this:
<mousebind button="A-Right" action="Drag">
<action name="Resize"/>
</mousebind>
Best Answer
Right click on an existing application shortcut in the panel and you will get a context menu with "
Application Launch Bar Settings
" at the top, this is what you want. If you do not have any existing shortcuts preset... I do not know.