fbpanel

 
About
Plugins
Screenshots
Docs
Download
Development
 

Documentation for fbpanel project

  1. Building fbpanel
  2. Configuring
    1. Quick way
    2. General
    3. Syntax
    4. Global panel's setting
    5. Configuring plugins
    6. Examples
  3. Running


Building fbpanel

The following is what you will need to compile fbpanel:
  • GTK+-2.4 headers and libraries (development package)

Once you have the above dependancies installed, you are ready to build fbpanel.

% tar zxvf fbpanel-x.y.tgz     #...untar the fbpanel archive 
% cd fbpanel-x.y               #...cd inside the source tree
% ./configure                  #...prepare source for compiling
% make                         #...fbpanel builds...
% su                           #...become root
% make install                 #...do install


top

Configuring

Quick way

Copy system default profile to your personal config directory and edit it.
% mkdir -p ~/.fbpanel
% cp /usr/share/fbpanel/default ~/.fbpanel/
% emacs ~/.fbpanel/default
This is plain text file, with a lot of comments - so you wont be lost :-)
The rest of this section explains what you will see inside that profile file.

General

fbpanel uses 'profile' idea to keep its configuration. Upon startup fbpanel is told what profile to use and it looks for the file with the same name in a ~/.fbpanel directory. If file was not there, then /usr/share/fbpanel is searched.
So 'fbpanel -p profile1' will look for ~/.fbpanel/profile1, or /usr/share/fbpanel/profile1.
No '-p' option is equivalent to '-p default'.

This way you can run many instances of fbpanel, each with its own configuration. My preference is one fbpanel as bottom panel with taskbar, and another at right edge with launchbar.

Here are two sample profile files (also supplied with source tarball) : default and pager.
You can use them or read next chapter to learn how to write your own.

Syntax

Configuration file consists of mandatory 'Global' block that MUST come first, and optionally one or more 'Plugin' block.
  • Lines having '#' as first non-blank char or blank lines are ignored
  • Value of variable is a text from first non-blank char after '=' till the last non-blank char. '#' is NOT treated as coment in this context

Global panel's settings

'Global' block describes global parameters like position, size and some NETWM settings.
Here is part of 'global' block of default profile.
Global {
     # screen edge  
     # legal values are: left, right, top, bottom
     edge = bottom

     # allignment of a panel
     # legal values are: left, right, center
     allign = left

     # length of margin (in pixels) 
     # legal values are numbers
     margin = 0

     # widthtype specifies how panel width is calculated
     # legal values are: request, pixel, percent
     #   request - follow widgets' size requests. can shrink or grow dynamically
     #   pixel   - ocupy fixed number of pixels, then 'width' variable holds a number
     #   percent - be 'width' precent of an edge.
     widthtype = percent

     # numerical value of width (not applicable for 'request' widthtype)
     # legal values are numbers
     width = 80

     # heighttype specifies how panel height is calculated
     # legal values are: pixel
     #   pixel   - ocupy fixed number of pixels, then 'height' variable holds a number
     heighttype = pixel

     # numerical value of height (if applicable)
     # legal values are numbers
     height = 28


     # Identify panel window type as dock 
     # legal values are boolean
     SetDockTpe = true

     # Reserve panel's space so that it will not be covered by maximazied windows
     # legal values are boolean
     # SetPartialStrut = true
 

     # Transparency stuff: 
     # TintColor is a color to composite on root background
     # Alpha is transparency of the tint color.
     # Transparent = true
     # TintColor = 0xFFFFFFFF
     # Alpha = 127
}


Plugin configuration

'Plugin' block specifies a plugin to load. First parameter is 'type' of a plugin. It's mandatory and must come first. This a list of types of currently implemented plugins.
  • separator - visual separator
  • wincmd - 'show desktop' button
  • taskbar - lists all opened windows (tasks)
  • launchbar - bar with launch buttons
  • image - just shows an image
  • tray - tray for docklets
  • dclock - digital clock
  • menu - menu
  • space - just seize space
  • icons - customize window icons
These parameters describe how plugin is placed:
  • expand - specifies if plugin can accomodate extra space or not [optional]
  • padding - extra paddin around plugin [optional]
And this block holds plugin's private data and very plugin dependant.
  • config - block that holds plugin's private data

Here are some 'plugin' blocks from default profile.
Plugin {
    type = wincmd
    config {
        image = /home/anatolya/usr/share/fbpanel/images/Desktop2.png
        tooltip = Left click to iconify all windows. Middle click to shade them.
    }
}

Plugin {
    type = menu
    config {
#        name = menu
        image = /home/anatolya/usr/share/fbpanel/images/Menu.png
        
        menu {
            name = Networking
            image = /home/anatolya/usr/share/fbpanel/images/Networking.png
            item {
#                image = 
                name = mozilla
                action = mozilla
            }
           
            item {
                name = gaim
                image = /usr/share/pixmaps/gaim.png
                action = gaim
            }
        }
       
       
        separator {
        }
        item {
            name = terminal
            image = /home/anatolya/usr/share/fbpanel/images/GNOME-Terminal.png
            action = xterm
        }
        item {
            name = emacs
            image = /home/anatolya/usr/share/fbpanel/images/Emacs.png
            action = emacs
        }
    }
}


Plugin {
    type = launchbar
    config {
        button {
            image = /home/anatolya/usr/share/fbpanel/images/GNOME-Terminal.png
            tooltip = Terminal
            action = xterm
        }
        button {
            image = /home/anatolya/usr/share/fbpanel/images/Emacs.png
            tooltip = Emacs
            action = emacs
        }
    }

}


Plugin {
    type = space
    #expand = true
    config {
        size = 30
    }   
}  

Plugin {
    type = pager
}
 
Plugin {
    type = separator
}  

# 'icons' plugin lets you customize window icons. 
# these changes applay to entire desktop.
# this plugin has no gui (invisible)
Plugin {
    type = icons
    config {
        application {
            Image = /home/anatolya/usr/share/fbpanel/images/GNOME-Terminal.png
            ClassName = XTerm
        }
        application {
            Image = ~/.fbpanel/images/GNOME-Terminal.png
            ClassName = mlterm
        }
        application {
            Image = ~/.fbpanel/images/GNOME-Terminal.png
            ClassName = URxvt
        }
        application {
            Image = /home/anatolya/usr/share/fbpanel/images/Emacs.png
            AppName = emacs
            ClassName = Emacs
        }

    }
}


Plugin {
    type = taskbar
    expand = true
    config {
        ShowIconified = true
        ShowMapped    = true
        ShowAllDesks  = false
        tooltips = true
        IconsOnly = false
        MaxTaskWidth = 150
    }
}

Plugin {
    type = tray
}

# Digital Clock
Plugin {
    type = dclock
    config {
        ClockFmt = %R
        TooltipFmt = %A %x
        Action = xmessage Please define some command &
    }
}



Examples

Here are two sample profile files
  • default - default profile supplied with source tarball
  • bottom - transparent panel at bottom of a screen
top

Running

Simple like that...
% fbpanel &                    #...laucnbar, taskbar, tray and clock along bottom edge
% fbpanel -p bottom &          #...panel at bottom of a screen


top
Updated on 30-04-2007