Wednesday, October 7, 2009

Rock The wbar Dock


wbar is a quick launch bar similar to the OSX dock. It's a lightweight and fast piece of useful eyecandy written in c++ using imlib2. While it isn't as full featured as Gnome-Do or Avant Window Manager, wbar's low overhead, speed, and efficient dependencies make it an ideal for netbooks.

To install wbar, in a terminal type:
sudo apt-get install wbar

- If you are using an older version of Ubuntu you can download the .deb from wbar's Google Code page.

To read wbar's manual in a terminal type:
man wbar

Configuring wbar can be done two ways:
1. By editing the config file manually
in a terminal type:
gedit ~/.wbar

To launch wbar when manually editing the config file, use the command:
wbar -above-desk
- You can also add other startup options to the command to change the position or other variables. Consult the wbar manual for options.

I made this .wbar config file by hand (excellent example with explanation for writing your own) and launch wbar with this command:
wbar -above-desk -bpress -vbar -pos bot-right -isize 48.0 -nofont
- This command aligns the launcher vertically on the bottom right hand corner of the screen, doubling the size and eliminates font rendering. You can see it below.

- Firefox, Nautilus, Pidgin, Skype, Rhythmbox, gtkpod, Transmission, Brasero & Virtualbox

2. Using WbarConf
You can download the WbarConf here.
- It offers an graphical interface allowing you to easily add launchers/icons, change the font, background image, configure wbar position, icon size, animation, font rendering and color.



To launch wbar when using WbarConf, use the command:
wbarconf --wbar

Below is a video of a quick wbar setup (took less than 5 minutes) I did using WbarConf

If you want to make wbar launch at startup.
in a terminal type:
mkdir ~/.scripts
- this will make a folder to store our script

gedit ~/.scripts/
- this will create the file for the wbar launcher script

Add the following text to the file (if using a manual config file):
#! /bin/sh
sleep 12
wbar -above-desk

Add the following text to the file (if using WbarConf):
#! /bin/sh
sleep 12
wbarconf --wbar

- The sleep command pauses (in seconds) the launching of wbar. Allowing the desktop to load. Feel free to increase/decrease the number if your desktop environment loads faster/slower.
- Your last line will differ depending on how you chose to configure wbar and the variables you chose to launch it with.

Then make the script executable by typing in a terminal:
sudo chmod +x ~/.scripts/

From there you Simply add ~/.scripts/ to your Startup Applications under System>Preferences>Startup Applications


Have a question or problem that this article doesn't cover?
Ask our Ubuntu Mini 9 Google Group for help.


redDEAD said...

I was going to call this article, Rock Out With Your Dock Out, but decided to take the classy route. Plus, Gnome-Do already used the lame pun for a release.

Phil said...

Nice article, like a lightweight avant window navigator. How does this look with the netbook remix?

redDEAD said...

Doesn't really work with it. You don't need two launchers. wbar is basically your favorites tab from UNR in bar form.

Nikku-Nikku said...

does it autohide?

redDEAD said...

it does not auto-hide

Anonymous said...

I don't seem to be able to get the autostart working.

I created the script (for wbarconf) and it appears to work (I tested it by running the comand "~/.scripts/" in terminal). I've tried adjusting the time delay in case it's that, but no joy

Any suggestions?

Really useful blog BTW - even if I'm personally "Ubuntu on the Acer Aspire One"!

Ricardo Alexander said...

Tengo un problema al ejecutar wbar:

nash@nash:~/Escritorio> wbar
Using /usr/share/wbar/dot.wbar config file.
/usr/share/wbar/iconpack/wbar.osx/osxbarback.png -> Image not found. Maybe using a relative path?

Alguna idea al respecto?

Opensuse 11.2
Gnome 2.28
wbar 1.3.3

Compile e instale el wbar sin problemas, el detalle es al momento de ejecutarlo...