Changing the size of BBdock

December 2, 2008

EDIT: It turns out that all this can be accomplished in a much easier way by launching BBdock with the command “bbdock -d 24×24” (or width x height), as David mentions in the first comment to this post. Oh well… 🙂

BBdock, one of the many useful little applications created to work with Blackbox, is a handy application launcher or dock. Though created for Blackbox and not updated in a few years, it can be used in any window manager that has a place to load dockapps, such as Openbox or Fluxbox. It is entirely configurable in a single text file (~/.bbdockrc). You can any .png file you want for the icons, and BBdock is able to raise applications you have already launched, instead of launching a new one.

The only downside to BBdock is its size. The default icon size it uses is the standard 64×64 of WindowMaker dockapps. Even if you use smaller image files, the dock itself will remain at that clunky size.

Luckily, this is not very hard to change. I prefer to have icons of 24×24, so that BBdock integrates nicely with lal, and bbpager (another one of the BBtools). Here is picture of BBdock and some other dockapps running in Openbox:

bbdock

BBdock, lal, BBpager, and docker in Openbox 3.4.7

So, how do you change the default size? You’ll need to edit the source code and then compile that, so start by downloading the source code from the BBdock website:

	wget http://bbdock.nethence.com/download/bbdock-0.2.8.tar.gz

Extract the archive, and move into the src directory of the newly extracted tarbal:

	tar xzf bbdock-0.2.8.tar.gz
	cd bbdock-0.2.8/src

Next, you’ll have to edit the Dock.hh file:

	nano Dock.hh

Search for the slotwidth( 64 ) and slotheight( 64 ) values (they should be on line 116-117), and change them to whatever size you’d prefer BBdock to use for its icons (I chose a square of 24×24):

	Settings() :
	   slotwidth( 24 ),
	   slotheight( 24 ),

Save the file and exit. Now you can compile the source code in the usual way. First install the necessary dependencies (make sure you have the source (deb-src) urls enabled in /etc/apt/sources.list!):

	sudo apt-get build-dep bbdock

Move back into the root directory of the source code, compile and install BBdock:

	cd ..
	./configure
	make
	sudo make install

(Use sudo checkinstall if you’d like to create a .deb package of the source code and install that, so that you can remove it easily later on through apt, aptitude or Synaptic)

If the installation is successful, the default icon size will be 24×24 (or whatever else you specified). Note that this size is static; even if you use smaller or bigger images, the size will remain the same.

To configure BBdock, create and edit the ~/.bbdockrc file. Each line in that file configures an icon in bbdock. You first specify the path to the icon file, followed by the command BBdock should execute when you click on the icon. If you’d like BBdock to raise applications that have already been launched instead of raising a new instance, you can specify that too. Here are some examples from my ~/.bbdockrc:

	~/.icons/bbdock/window.png:xte 'key Pause'::
	~/.icons/bbdock/text.png:mousepad::
	~/.icons/bbdock/opera.png:opera:*opera
	

The first icon uses xte to simulate a keypress of the PrintScreen key, which I have configured in Openbox’s rc.xml to launch the client-list-combined-menu which shows all running applications on all desktops. The second icon will launch a new instance of Mousepad whenever I click the icon, and the third icon will launch Opera or raise an already running instance of Opera.

15 Responses to “Changing the size of BBdock”

  1. David said

    You can also just run bbdock -d 24×24 (or width x height), i only know this because i did the same thing as you before discovering it 🙂

  2. Timóteo said

    Thks a lot, this docks seems to be exactly what I was looking for. If it had autohide would be amazing ^^

  3. Timóteo said

    I was trying to install but it says I dont have the X windows system libraries and headers o.o

    Dunno what this means

  4. dwindle said

    Thanks a lot, I appreciate this ^^
    Although I wish I’d have known sooner about David’s suggestion o_o

  5. urukrama said

    Thanks, David. That is a lot simpler!

    Timóteo, you can autohide bbdock if you load it into Openbox’s dock, Pekwm’s harbour or Fluxbox’s slit and set the dock/harbour/slit to autohide. To fix your error messages, try installing libx11-dev (assuming you are using Debian or Ubuntu, or any distro based on these).

  6. abe said

    hei, can i ask u the link of the icon theme of the first screenshot?!? (the brown one)
    good job!

  7. Congac said

    The screenshot is fantastic!
    As abe said, can you post a link to the icon theme and also the gtk?

  8. Congac said

    The screenshot is fantastic!
    As abe said, can you post a link to the icon theme and also the gtk?

  9. urukrama said

    Thank you. The Gtk theme is my own Children of the Earth. You can download it with the matching Openbox theme here.

    The icon theme is something I’ve been working on. I t is still fairly incomplete and needs some more work. I haven’t uploaded it anywhere yet.

  10. Timóteo said

    urukrama, i ckecked the libx11-dev, if I try to install it says I already have the newest version. Also, the build-deb command doesnt work for me.

    I dont know what deb-src should be available on sources.lists.

    There should be one in the repos already =p
    Anyway, I’ll be looking for what’s missing, but I dont think i’ll be needing a app launcher now. It’s more for curiosity.

  11. abe said

    how bad for the icons… the world really needs a set like that… i hope that u can finish it soon =)
    good job!

  12. harii said

    you should check into adeskbar–looks much like bbdock.
    It is easy too install and conf.

  13. Ronald said

    After watching the screenshot, I found my debian box’s blackbox has tray icon missing. The little opera mail icon is mostly useful for me.

    But I can’t use apt-get to install the package, and I don’t know how to compile it, seems need to install x libs and headers package first but I don’t know the package names.

    Can you send me the rc file and binary package of it to my mail address?

    Ronald

  14. […] Originally Posted by dive Love that background. Would bbdock work in OpenBox? It runs in the slit in Fluxbox. Yes, it will. I currently have installed and tested, works fine. Something has changed (not going), has received several warnings, but I did not notice. Some information https://urukrama.wordpress.com/2008/1…ize-of-bbdock/ […]

  15. […] you’ve tried to compile the source code for bbdock, that nifty little blackbox dock, on Debian Wheezy (and presumably other recent distros) without much success, try Markus […]

Leave a comment