This is a HOWTO to use programs like Workrave that require a good system tray to work in Unity. I was very annoyed by Unity's lack of a good system tray that I found a different solution.
Note: Workrave 1.10 will include a Unity indicator, but I wasn't able to compile that version. See it's NEWS file.
See the attached screenshot for what it will become.
1. Install packages
You might need to install additional packages with
sudo apt-get install xfce4-panel wmctrl
2. Set up panel
- Start xfce4-panel inside a console (or via alt+f2).
- Select 'one empty panel' (or something like that) in the popup.
- Set the panel in a good location, for example, at the top.
- Set the height (in the panel preferences) to 24 pixels.
- Set the background to solid color and then the alpha to zero (fully transparent).
- Add the panel applet 'notification area' to the panel.
Warning: don't use the Dash: it will overlay the panel. This will be fixed later.
3. Make the panel start at system start
Create a file somewhere in your home directory with this contents:
The line starting with 'wmctrl' does a bit of magic: it finds the window ID of the applet and makes it the topmost window. This way it won't disappear when you use the Dash (Windows/Super-key). Remember to replace the hostname in the egrep command. Run to see what you have to grep for.
wmctrl -l -G | /bin/egrep "your-hostname xfce4-panel$" | cut -d " " -f 1 | xargs -n 1 wmctrl -b add,above -i -r
Make it executable:
And add it to the list of startup applications.
sudo chmod +x your-panel-applet-script-filename.sh
4. Bonus: hide letters under it (Firefox page titles etc.)
Set the background to the attached 'top bar.png' file. This is a screenshot of a part of the top bar. This hides long page titles of web pages etc.
5. Bonus: add analog Xfce clock
You can also use other panel applets, but the analog Xfce panel applet won't work (the clock is black with a dark-grey background). Use this solution to make it visible again. It makes the clock white.