Difference between revisions of "LXPanel"
m (typos) |
m (I looked in every location listed trying to find the "panel" file. It wasn't until I opened the Panel Settings/Panel Preferences that it appeared. I tested it out just to be sure.) |
||
(57 intermediate revisions by 15 users not shown) | |||
Line 1: | Line 1: | ||
− | { | + | {{Infobox component |
− | | | + | |name = LXPanel |
− | + | |image = LXPanel menu.png | |
− | | | + | |image description = |
− | | | + | |developer = LXDE Team |
− | | | + | |version = {{VersionAndDate | lxpanel |y|}} |
− | + | |date = {{VersionAndDate | lxpanel ||y}} | |
− | | | + | |genre = Desktop Panel |
− | | | + | |license = GNU General Public License |
− | | | + | |website = [http://lxde.org/ 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. As of version 0.7.0, LXPanel has gained theming support via custom <code>gtkrc</code> file. |
− | | | ||
− | | | ||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | Desktop Panel | ||
− | | | ||
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | + | == 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. |
− | * | + | * On a fresh install of LXDE, the "panels" directory may be empty. Entering the Panel Settings/Panel Preferences for the first time will result in the creation of the "panel" file for the default panel. |
− | + | === Main Config File === | |
− | |||
− | |||
− | |||
− | |||
− | ===Main Config File=== | ||
The main config file is named "config", and its format is like this: | The main config file is named "config", and its format is like this: | ||
<pre> | <pre> | ||
Line 56: | Line 32: | ||
LogoutCommand= | LogoutCommand= | ||
</pre> | </pre> | ||
− | + | ; FileManager: file manager used when an applet in lxpanel need to open a folder (only before version 0.7.0, since 0.7.0 it uses XDG preferences). | |
− | + | ; Terminal: terminal emulator used when an applet needs to popup a terminal window (only before version 0.7.0, since 0.7.0 it uses LibFM config). | |
− | + | ; Logout: 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 : prior to lxpanel version 0.5.10 it seems that it was "LogoutCommand" instead of "Logout". | |
− | ===Panels=== | + | === 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. | 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: | The default config file looks like this: | ||
Line 109: | Line 85: | ||
type = menu | type = menu | ||
Config { | Config { | ||
+ | # image must be set | ||
image=/usr/share/lxpanel/images/my-computer.png | 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 { | system { | ||
} | } | ||
Line 216: | Line 201: | ||
</pre> | </pre> | ||
− | ===GNOME-Like Two Panel Layout=== | + | === Custom menu plugin actions === |
− | LXPanel can support multiple-panel layouts. We provide a set of configuration files mimic the default look and feel of gnome-like two-panel layout here. | + | Under the Menu plugin entry shown above, custom entries can be added using the action= setting. For example: |
− | http://lxde. | + | item { |
+ | image=boot | ||
+ | name=Exit | ||
+ | action=lxde-logout | ||
+ | } | ||
+ | (This should not be confused with the main menu specification from freedesktop.org implemented via *.desktop files in /usr/share/applications ) | ||
+ | |||
+ | === 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 | ||
+ | |||
+ | === Fix empty menu in LXPanel === | ||
+ | If you click on the menu button, but the menu doesn't come up, you can use this little script to fix it: | ||
+ | <pre> | ||
+ | #!/bin/bash | ||
+ | |||
+ | killall lxpanel | ||
+ | find ~/.cache/menus -name '*' -type f -print0 | xargs -0 rm | ||
+ | lxpanel -p LXDE & | ||
+ | </pre> | ||
+ | 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 [http://wiki.lxde.org/en/Category:Testing Testing] pages. | ||
+ | |||
+ | === Addresses === | ||
+ | * Source browser: http://git.lxde.org/gitweb/?p=lxde/lxpanel.git;a=summary | ||
+ | * Source Git: git://git.lxde.org/lxde/lxpanel.git | ||
+ | * Bugs tracker: http://sourceforge.net/p/lxde/bugs/ | ||
+ | |||
+ | === Compiling options === | ||
+ | ./autogen.sh | ||
+ | ./configure | ||
+ | make | ||
+ | make install | ||
+ | |||
+ | you'll need [[menu-cache]] from the LXDE repository to compile LXPanel. | ||
+ | |||
+ | == gxine menu icon fix == | ||
+ | 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. | ||
+ | |||
+ | == Icons only == | ||
+ | It is possible to change the panel appearance to a very minimalist style, similar to tint2, displaying only icons rather than tabs. To do this, open panel settings (e.g. right clicking on the "desktops" part of the panel) and: | ||
+ | * choose Panel Applets tab | ||
+ | * from the list, choose "Task Bar (Window List)" | ||
+ | * click edit | ||
+ | * to get just the icons against the background of the panel, select both "Icons only" and "Flat buttons" | ||
+ | |||
+ | "Show tooltips" and "Show windows from all workspaces" options are also available on the Panel Applets tab. | ||
+ | |||
+ | To adjust icon size as well as panel widthand height, see the Geometry tab in settings. The thickness of the bar and the size of the icons are set separately. | ||
+ | == See also == | ||
+ | * [[How to write plugins for LXPanel]] | ||
+ | * [[Main Menu]] | ||
+ | * [[LXPanel Theming]] | ||
+ | |||
+ | == External Links == | ||
+ | * [http://sourceforge.net/projects/lxde/files/LXPanel%20%28desktop%20panel%29/ LXPanel at sf.net] | ||
+ | * [http://pclosmag.com/html/Issues/201010/page07.html LXDE: Configuring LXPanel] ''PCLinuxOS Magazine'' - detailed configuration instructions. | ||
[[Category:LXDE]] | [[Category:LXDE]] | ||
− | [[Category: | + | [[Category:Component]] |
− | [[ | + | |
+ | [[de:LXPanel]] | ||
+ | [[fr:LXPanel]] | ||
+ | [[pt:LXPanel]] | ||
+ | [[sv:LXPanel]] | ||
+ | [[zh:LXPanel]] | ||
+ | [[ru:LXPanel]] |
Latest revision as of 02:53, 18 April 2019
LXPanel | |
Developer | LXDE Team |
Latest version | 0.10.1 (from 6 Feb. 2021) |
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. As of version 0.7.0, LXPanel has gained theming support via custom gtkrc
file.
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.
- On a fresh install of LXDE, the "panels" directory may be empty. Entering the Panel Settings/Panel Preferences for the first time will result in the creation of the "panel" file for the default panel.
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 (only before version 0.7.0, since 0.7.0 it uses XDG preferences).
- Terminal
- terminal emulator used when an applet needs to popup a terminal window (only before version 0.7.0, since 0.7.0 it uses LibFM config).
- Logout
- 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 : prior to lxpanel version 0.5.10 it seems that it was "LogoutCommand" instead of "Logout".
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 } }
Under the Menu plugin entry shown above, custom entries can be added using the action= setting. For example:
item { image=boot name=Exit action=lxde-logout }
(This should not be confused with the main menu specification from freedesktop.org implemented via *.desktop files in /usr/share/applications )
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 find ~/.cache/menus -name '*' -type f -print0 | xargs -0 rm 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
- Source browser: http://git.lxde.org/gitweb/?p=lxde/lxpanel.git;a=summary
- Source Git: git://git.lxde.org/lxde/lxpanel.git
- Bugs tracker: http://sourceforge.net/p/lxde/bugs/
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.
Icons only
It is possible to change the panel appearance to a very minimalist style, similar to tint2, displaying only icons rather than tabs. To do this, open panel settings (e.g. right clicking on the "desktops" part of the panel) and:
- choose Panel Applets tab
- from the list, choose "Task Bar (Window List)"
- click edit
- to get just the icons against the background of the panel, select both "Icons only" and "Flat buttons"
"Show tooltips" and "Show windows from all workspaces" options are also available on the Panel Applets tab.
To adjust icon size as well as panel widthand height, see the Geometry tab in settings. The thickness of the bar and the size of the icons are set separately.
See also
External Links
- LXPanel at sf.net
- LXDE: Configuring LXPanel PCLinuxOS Magazine - detailed configuration instructions.