LXPanel

From LXDE.org
Revision as of 14:22, 18 September 2008 by Mario Behling (talk | contribs)
Jump to: navigation, search
LXPanel
250px
Developer LXDE Team
Latest version
Release date and age 10 September, 2008
Frequently updated yes
Programming language C
Platform Cross-platform, Unix-like
Status active
Genre Desktop Panel
License GNU General Public License
Website lxde.org

The LXPanel, is the standard panel of LXDE. The desktop panel can generate menu for installed applications automatically from *.desktop files. It can be configured from GUI preference dialog, and there is no need to edit config files. The component provides a "Run" dialog with autocompletion.

Important Notes

  • Warning: Although lxpanel is originally derived from fbpanel, now they are almost totally different both in internal implementation and configuration. So, don't use fbpanel config files here or things will break.
  • The basic configuration of LXPanel can be done with 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 was 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's not yet stablized. Now, it's documted 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> instread.

Main Config File

The main config file is namd "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 need to popup a terminal window.
  • LogoutCommand: program involked when "Logout" is choosen in the lxpanel menu. Generally, this can be "killall <something>". Under LXDE, you can use "lxde-logout" to logout the session.

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=/usr/share/lxpanel/images/my-computer.png
        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 mimic the default look and feel of gnome-like two-panel layout here. http://lxde.svn.sourceforge.net/viewvc/lxde/trunk/lxpanel/data/two_panels/