Next Previous Table of Contents

### 4. Developers' Guide

This section covers topics of interest to expert users and developers. It covers the following topics:

- kpanel Commands
- kpanelrc Configuration File

### 4.1 kpanel Commands

You can send commands to kpanel via the K Window Manager using either of two techniques:

`KWM::sendKWMCommand(QString)` (in KDE applications)
or
`kwmcom command` (from the command line)

kpanel responds to the following commands:

- kpanel:restart restarts the panel, reloading its configuration files.

- kpanel:hide hides the panel on the current desktop, as if the user had clicked the small textured bar at the end of the panel.

- kpanel:show shows the panel if it was hidden.

- kpanel:system opens the Application Starter.

- kpanel:goXXXXYYYY opens the Application Starter at a specific location on the screen. For example, `kpanel:go05000100` opens the menu at coordinates (500,100).

- kpanel:icon:#:button changes the icon displayed for button on the panel. # can be 1-4, and refers to an icon defined for the button in the button's .kdelnk file (lines of the form icon=pixmap, icon2=pixmap, etc.).

### 4.2 kpanelrc

kpanel can be configured using the KDE Control Center (application starter > KDE Control Center). Choose Panel from the Applications section to work with the various configuration options.

For those who prefer to edit a configuration file, this section explains the options in the kpanelrc file, located in ~/.kde/share/config.

The kpanelrc configuration file is divided into two sections:

- kpanel
- kpanelButtons

#### [kpanel]

The kpanel section contains a number of entries that govern kpanel's behavior.

- AutoHide=`on|off`
  When `on`, the panel automatically hides itself when the user moves the pointer off the panel.

- AutoHideTaskbar=`on|off`
  When `on`, the taskbar automatically hides itself when the user moves the pointer off the panel.

- BackgroundTexture=pixmap
  Displays pixmap as the panel background.

- BoxHeight=value (in pixels)
  BoxWidth=value (in pixels)
  These settings determine the height of the panel and the width of buttons on the panel, respectively.

- ClockAmPm=`on|off`
  When `on`, the clock on the panel displays an AM/PM indicator; when `off`, the clock shows time in 24-hour format.

- DateFont=font
  Specifies the font for the clock on the panel. Use an X font specifier, like `*-times-medium-i-normal--12-*`.

- DateVisible=`true|false`
  If `false`, hides the panel's clock.

- DesktopButtonFont=font
  Specifies the font for the virtual desktop buttons on the panel.

- DesktopButtonHorizontalSize=value
  Specifies the width of the virtual desktop buttons on the panel. The value is multiplied by half the `BoxWidth`.

- DesktopButtonRows=value
  Specifies the number of rows of virtual desktop buttons on the panel.

- FoldersFirst=`on|off`
  When `on`, submenus on the application starter menu always appear at the top. When `off`, all items appear in alphabetical order.

- Margin=value (in pixels)
  This value specifies the size of the top and bottom border for the panel.

- MenuToolTips=value (in milliseconds)
  Specifies the length of time a user must hold the mouse over an item on the application starter menu before a tooltip appears.

- PanelHidden=00000000
  This setting specifies on which desktops the panel is hidden. There are 8 positions in the setting, corresponding to the 8 desktops. A 0 in a position indicates that the panel is visible on the corresponding desktop; a 1, that the panel is hidden. For example, a setting of 01011000 hides the panel on desktops 2, 4, and 5.

- PersonalFirst=`on|off`
  When `on`, the user's personal menu settings appear as the primary choices on the application starter menu. When `off`, the default KDE choices are primary.

- Position=`bottom|top|left|right`
  Specifies the position of the panel on the screen.

- Style=normal|tiny|large
  Specifies the style of the panel. This is used by the graphical kpanel configuration utility kcmkpanel and does not directly affect the panel's appearance.

- TaskbarButtonHorizontalSize=value
  An integer which specifies the width of the taskbar.

- TaskbarPosition=`top|top_left|bottom|hidden`
  Specifies the position of the taskbar on the screen. If `hidden`, the taskbar is not visible.

#### [kpanelButtons]

This section specifies the layout of the panel buttons.

- Buttons=button1, button2, ...
  A list of the buttons on the panel, where button# can be `system` (the application starter), `windowlist` (the window list), or the absolute path of a .kdelnk file.

- ButtonDelta=delta1, delta2, ...
  Specifies the positions of the buttons on the panel. The deltas are floating point values, and for each button, represent the distance from the button immediately to the left/top.

- control=value
  Specifies which button the virtual desktop button group comes after. If 0, the group comes immediately after the K button; if 1, it comes after the button after the K, and so forth.

- controldelta=delta
  Specifies the distance of the virtual desktop button group from the button immediately to the left/top.

Next Previous Table of Contents