Difference between revisions of "LXPanel"
(→Testing LXPanel: a bit English) |
Linuxconsole (talk | contribs) (→Main Config File) |
||
Line 35: | Line 35: | ||
; Terminal: terminal emulator used when an applet needs to popup a terminal window. | ; Terminal: terminal emulator used when an applet needs to popup a terminal window. | ||
; LogoutCommand: program invoked when "Logout" is chosen in the lxpanel menu. Generally, this can be "killall <something>". Under LXDE, you can use "lxde-logout" to logout the session. | ; LogoutCommand: program invoked when "Logout" is chosen in the lxpanel menu. Generally, this can be "killall <something>". Under LXDE, you can use "lxde-logout" to logout the session. | ||
+ | ; Warning : it seems that in latest (git) code, it is "Logout" instead of "LogoutCommand" | ||
=== Panels === | === Panels === |
Revision as of 14:23, 24 September 2010
Developer | LXDE Team |
Latest version | 0.5.6 (from 20 July, 2010) |
Genre | Desktop Panel |
License | GNU General Public License |
Website | lxde.org |
LXPanel is the standard panel of LXDE. The desktop panel can generate a menu for installed applications automatically from *.desktop files. It can be configured from a GUI preferences dialog, so there is no need to edit config files. The component provides a "Run" dialog with autocompletion.
Contents
Important Notes
- Warning: Although lxpanel is originally derived from fbpanel, they are now almost totally different both in internal implementation and configuration. So, don't use fbpanel config files here or things will break.
- Basic configuration of LXPanel can be done with the GUI preference configuration dialog. Just right click on the panels, and you can access the config dialog. Please use the GUI instead of directly editing the config files if you don't have very special needs.
- The format of config files has changed since version 3.5 to support multiple panel layout. Don't mix older config files with newer versions.
- The config file format was not documented before version 3.7 because it was not yet stabilized. Now, it's documented here.
File Locations
- The config files of LXPanel are stored in ~/.config/lxpanel/<Profile Name>.
- Under LXDE, we use a different profile name - LXDE. So it's in ~/.config/lxpanel/LXDE. In this way, if you changed the config of the panel under LXDE, it won't interfere other desktop environments.
- If the config files are missing, lxpanel loads system-wide config in /usr/share/lxpanel/profile/<Profile name> instead.
Main Config File
The main config file is named "config", and its format is like this:
[Command] FileManager=pcmanfm %s Terminal=xterm -e LogoutCommand=
- FileManager
- file manager used when an applet in lxpanel need to open a folder.
- Terminal
- terminal emulator used when an applet needs to popup a terminal window.
- LogoutCommand
- program invoked when "Logout" is chosen in the lxpanel menu. Generally, this can be "killall <something>". Under LXDE, you can use "lxde-logout" to logout the session.
- Warning
- it seems that in latest (git) code, it is "Logout" instead of "LogoutCommand"
Panels
Files defining the layout of panels are in ~/.config/lxpanel/<Profile>/panels. Each file in the directory defines a panel. On startup, all panels defined in those files are loaded. The default config file looks like this:
# lxpanel <profile> config file. Manually editing is not recommended. # Use preference dialog in lxpanel to adjust config when you can. # Global section: defines appearance and behavior of this panel. Global { edge=bottom # The edge this panel attaches to allign=left # alignment: left/center/right margin=0 # margin: margin to the edge of the whole screen widthtype=percent # percent/pixel width=100 # width of the panel: The unit used here is according to widthtype. height=26 # height of the panel transparent=0 # use (pseudo-)transparent background: on=1, off=0 tintcolor=#000000 # color blended with the backgroud when transparency is used. alpha=0 # alpha value used to blend tintcolor with background. setdocktype=1 # ask the window manager to treat the panel as a dock. setpartialstrut=1 # ask the window manager to reserve the space for the panel and not to cover it with maximized windows usefontcolor=1 # use customize colors for the text instead of that defined in system theme. fontcolor=#ffffff # color of text on the panel (Currently this is only supported by clock applet) background=1 # use customize image to draw the background of the panel. (cannot be used with transparent) backgroundfile=/usr/share/lxpanel/images/background.png # The image file used. } # Configuration of various applets # Basic syntax: # Plugin { # type=<plugin type> # expand=0 (optional, mainly used in "taskbar" and "space" applets. # expand=1 will stretch the applet to fill all available spaces) # Config { # ... # } # } Plugin { type = space Config { Size=2 } } Plugin { type = menu Config { # image must be set image=/usr/share/lxpanel/images/my-computer.png # name is optional # it may be set to the name of a *.directory file in /usr/share/desktop-directories to get a localised label # eg. name=lxde-menu-applications.directory name=Label # tint may be set to an X11 colour name or a hex value, # see http://library.gnome.org/devel/gdk/unstable/gdk-Colormaps-and-Colors.html#gdk-color-parse # The default is blue; black disables tinting. tint=red system { } separator { } item { command=run } separator { } item { image=gnome-logout command=logout } } } Plugin { type = launchbar Config { Button { id=pcmanfm.desktop } Button { id=gnome-terminal.desktop } Button { id=firefox.desktop } } } Plugin { type = space Config { Size=4 } } Plugin { type = wincmd Config { Button1=iconify Button2=shade } } Plugin { type = space Config { Size=4 } } Plugin { type = pager } Plugin { type = space Config { Size=4 } } Plugin { type = taskbar expand=1 Config { tooltips=1 IconsOnly=0 AcceptSkipPager=1 ShowIconified=1 ShowMapped=1 ShowAllDesks=0 UseMouseWheel=1 UseUrgencyHint=1 FlatButton=0 MaxTaskWidth=150 spacing=1 } } Plugin { type = netstat } Plugin { type = cpu } Plugin { type = tray } Plugin { type = dclock Config { ClockFmt=%R TooltipFmt=%A %x BoldFont=0 } }
GNOME-Like Two Panel Layout
LXPanel can support multiple-panel layouts. We provide a set of configuration files that mimic the default look and feel of a gnome-like two-panel layout here. http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxpanel;a=tree;f=data/two_panels;hb=HEAD
If you click on the menu button, but the menu doesn't come up, you can use this little script to fix it:
#!/bin/bash killall lxpanel file=`find ~/.cache/menus -name "*" -type f` rm ${file} lxpanel -p LXDE &
It will kill lxpanel, delete the current menu cache and start the panel again. Tested with 0.3.99/0.3.999.
Testing LXPanel
Here you can find the special Information for LXPanel. If you want to use the menu plugin within LXPanel, you need to compile applications menu-cache and lxmenu-data too. First compile menu-cache, then lxmenu-data and at last LXPanel. For general information on testing read the Testing pages.
Addresses
- Git: http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxpanel;a=summary
- Tracker: http://sourceforge.net/tracker/?group_id=180858
- Bugtracker: http://sourceforge.net/tracker/?group_id=180858&atid=894869
Compiling options
./autogen.sh ./configure make make install
you'll need menu-cache from the LXDE repository to compile LXPanel.
Open file /usr/share/applications/gxine.desktop:
# nano /usr/share/applications/gxine.desktop
Delete lines:
x-content/video-svcd x-content/video-vcd
Change "Categories" value:
Categories=AudioVideo;Player;TV;
gxine is placed in the menu now.