LXPanel
出自LXDE.org
| LXPanel | ||
| ||
| Developer | LXDE Team | |
| Latest version | 0.5.10 | |
| Release date and age | June, 2012 | |
| Frequently updated | yes | |
| Programming language | C | |
| Platform | Cross-platform, Unix-like | |
| Status | active | |
| Genre | Desktop Panel | |
| License | GNU General Public License | |
| Website | lxde.org | |
LXPanel 是 LXDE 預設使用的面板。它可以從 *.desktop 檔案自動製造出選單,也有 GUI 的偏好設定對話框(因此不需要手動修改設定檔)。這個元件也提供擁有自動完成選單的「執行」對話框。
目錄 |
重要事項
- 警告:雖然 LXPanel 原本是從 fbpanel 修改而來,但是目前內部的實做以及設定檔都已經與 fbpanel 相差甚大,因此請勿將 fbpanel 的設定檔套用至 LXPanel,否則會有嚴重後果。
- 圖形介面的偏好設定對話框可以完成基本的 LXPanel 設定;在面板按滑鼠右鍵即可選用。只有當您有特殊需求時,才需要直接修改設定檔。
- 設定檔的格式從 3.5 版開始有所變動,目的是為了支援多面板的顯示,因此請勿將舊的與新的設定檔混合設定。
- 在 3.7 版以前因為 LXPanel 尚不穩定,因此設定檔的格式並沒有記載。目前已紀錄於本條目。
- LXPanel暫時無法修改字體大小,字體大小根據ICON大小確定。
檔案位置
- LXPanel 的設定檔存放於 ~/.config/lxpanel/<設定名稱>。
- 在 LXDE 中,我們使用不同的配置名稱:LXDE。因此它存放在 ~/.config/lxpanel/LXDE。所以當您在 LXDE 修改設定,並不會影響到其他桌面環境。
- 當找不到設定檔時,LXPanel 會讀取系統預設的設定,存放於 /usr/share/lxpanel/profile/<Profile name>。
主要設定檔
主要設定檔檔名為 "config",其格式如下:
[Command] FileManager=pcmanfm %s Terminal=xterm -e LogoutCommand=
- FileManager
- 當 LXPanel 需要開啟目錄時使用的檔案管理器。
- Terminal
- 當程式需要開啟終端機視窗時所使用的終端機模擬器。
- LogoutCommand
- 當您從 LXPanel 選單點選「登出」時所要執行的指令。一般來說這可以是 "killall <程式>",而在 LXDE 中您可以使用 "lxde-logout" 來登出這個作業階段。
面板
定義面板的配置存放於 ~/.config/lxpanel/<設定名稱>/panels,每一個檔案代表一個面板,啟動時所有檔案中定義的面板會全部載入。 預設的設定檔格式如下:
# 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 的雙面板配置
LXPanel 可以使用多面板配置,我們另提供一些設定檔模仿 GNOME 預設的雙面板配置。 http://lxde.svn.sourceforge.net/viewvc/lxde/trunk/lxpanel/data/two_panels/
