Home | Sitemap | Last changes RSS Feed | Wiki help | Wiki tools | SandBox
Preferences | Edit this page | View source | Page history | Referrers
Document last modified: Tue, 15 Jun 2010, 20:11 UTC
Parents: BlackboxFAQ/

Blackbox FAQ/Visual Appearance

This FAQ section covers questions related to the way Blackbox looks. This means issues about styles, eye-candy, desktop organization, size and resolution, etc. However, issues about placing various add-ons and tools around the desktop qualify for the /AddOns section instead.

Do not add new questions here. Add them to /NewQuestions instead, so they can be reviewed and answered at least once.

However, feel free to add more answers to any question. Place your answer after any other answers, mark it with a bold A: and add a number if there is already at least one other answer (ie. A1:, A2:).

When in doubt about something, don't do anything, or, add a comment stating your concerns. Let others review the issue too.

1 How can I use eye-candy from X.org (shadows, translucency)?
2 Is is possible to have one style or wallpaper for each workspace?
3 What fonts will Blackbox fallback to if the style fonts are missing?
4 What is the name of the widget that appears next to selected config options in the root menu?
5 What is the best way to set the background? bsetbg in ~/.xinitrc shows the background briefly, Blackbox overrides it.
6 How do I get GNOME themes working with my GTK+ apps under Blackbox?
7 gnome-terminal transparency works with the background color from the style but not with the background image?
8 I don't see any text in the menu or window bars, and the menus and bars are huge!
9 Fonts show up as boxes under cygwin.
10 How do I get anti-aliased fonts?
11 Is there a way for Blackbox to understand screens in Xinerama mode?
12 Why do menus in 0.70 feel slower?
13 Why do I get small boxes in the window titles instead of international characters?
14 Is there a list of all the style resources?
15 I don't like the new buttons in 0.70; is it possible to change them back to 0.65 buttons or modify them?
16 How can I explicitly set the toolbar height?
17 How can I change the height (and font size) of the window title bar?
18 Is it possible to decide the position and geometry which a certain application will use?

1) How can I use eye-candy from X.org (shadows, translucency)?

A: (As told by Johannes Winkelmann on the mailing list) [...]The drop shadow and translucency effects just work when enabling the Composite extension in xorg.conf and:

  1. starting xcompmgr -c for shadows
  2. running the transset tool for the translucency

It is unbearably slow on my 1.4 GHz P4 though; with shadows enabled, it takes about 3 seconds for an aterm window to be redrawn at the new position when moving it.

I think it depends on whether you're using an accelerated X driver or not. I've tried it myself on a 1.5 GHz processor, GeForce2 MX video card, using the "nvidia" driver. There's only a very slight, almost unnoticeable delay, and only when switching workspaces. The non-accelerated "nv" driver, on the other hand, is noticeably slower even when just dragging windows. For users of the "nvidia" driver it will also help setting Option "RenderAccel" "true" in the Device section of xorg.conf. -- CiprianPopovici

I used the following guide to get started (I'm not on gentoo, so don't worry, it's not gentoo specific): http://forums.gentoo.org/viewtopic.php?t=210008&highlight=xorg

Finally a few screenshots (with blackbox 0.70beta2):

To summarize, the eye candy just works[...].


2) Is is possible to have one style or wallpaper for each workspace?

A: Currently there is no way to do that with Blackbox. Read this thread* in the users mailing list archive for details on why such a feature is not practical. Remember, Blackbox strives for performance; such a feature would definitely have a negative impact on performance and would only offer eye-candy in exchange.


3) What fonts will Blackbox fallback to if the style fonts are missing?

A: According to the source code, the default is either sans-serif in case Blackbox was compiled with Xft (fontconfig) support, or fixed otherwise. They are both safe bets since X11 will not start without having a fixed font defined, and fontconfig always defines a sans-serif.


4) What is the name of the widget that appears next to selected config options in the root menu?

A: menu.active.color (menu.hilite.color for Blackbox < 0.7) is used both for the colour of that widget, as well as for the highlight color of the current menu option. The only documentation for this so far is BlackboxDocumentation/BlackboxStyles, but grepping existing styles can help find other names. When you do find said names please add them to that wiki page.


5) What is the best way to set the background? bsetbg in ~/.xinitrc shows the background briefly, Blackbox overrides it.

A1: That's because every Blackbox style has its own background-setting command, which gets executed every time a style is loaded (which also means when Blackbox starts or reloads its configuration). Therefore you need to locate the style files and edit their rootCommand resource. You can replace all their rootCommand's with a call to your own single shell script which does whatever you want.

A2: If you have another application that takes care of the root window, such as the RoX pinboard, you need to look into their specific methods of setting the background.

A3: Starting with 0.70 final, Blackbox provides a master rootCommand in the rc config file. If you set it to anything non-blank, it will override the rootCommand's from the style files. This is the most effective way of making sure your background of choice is always the same (as long as there isn't another application taking over the root window, see A2).

A4: See BlackboxDocumentation/BlackboxBackground for more detailed explanations.


6) How do I get GNOME themes working with my GTK+ apps under Blackbox?

A1: You can set the theme with gnome-theme-manager, which is part of the Gnome Control Center, or a program like gtk-theme-switch. To have your various Gnome-related settings maintained without running a full Gnome session it may be necessary to start gnome-settings-daemon. This can be done automatically on startup by adding it to ~/.xinitrc or ~/.xsession.

A2: Please note that Gnome themes (as well as KDE/Qt themes for that matter) have nothing to do with Blackbox. GTK+ deals with the inside of the application windows, whereas Blackbox deals only with the windows themselves ie. titlebar, borders, moving and resizing and so on. While you may have heard that some GTK+ themes are supposed to change the window titlebar too, that only applies to Gnome-native window managers, such as Metacity.


7) gnome-terminal transparency works with the background color from the style but not with the background image?

A1: I haven't really checked, but I suspect that some 'set root window' commands don't actually replace the root window bitmap. Try using different commands to set the image in the root window, such as wmsetbg.

A2: BlackboxPatch:1450619 has a solution for this. Hopefully it will be included in the next release. Themes also need to use bsetbg in the rootCommand for consistency, as it is merely a wrapper for other 'set root window' commands that can be easily modified to use reliable commands first.


8) I don't see any text in the menu or window bars, and the menus and bars are huge!

A: See BlackboxBug:1172779 for discussion. This is not really a Blackbox bug and there isn't much Blackbox can do about, short of giving up XLFD font addressing. The simple solution: always use FontConfig fonts in your styles (ie. stuff that appears in the listing from fc-list).


9) Fonts show up as boxes under cygwin.

A: See BlackboxBug:1105302 for discussion.


10) How do I get anti-aliased fonts?

A: First of all, please note that Blackbox only supplies fonts for its own widgets (window titlebars, menus, toolbar). To get anti-aliased fonts:


11) Is there a way for Blackbox to understand screens in Xinerama mode?

A: The "way" would be for Blackbox to implement full Xinerama support. It currently doesn't, so what you get is one big "screen" across all monitors. This will affect maximized and fullscreen windows, general placement and positioning of windows, panels, slit, toolbar and so on. Some applications may have their own Xinerama support to some extent, and may react differently.

Follow-up: Does Blackbox plan on implementing full Xinerama support?

A1: See the answer to the question about implementing new features in Blackbox, under /BlackboxItself. Short version: probably not. Brad doesn't use Xinerama and as long as he doesn't he won't implement this. The most likely way for this to happen is either to have someone else implement it and submit a patch, or to get Brad a second monitor for his birthday. :)

A2: BlackboxPatch:1286688 proposes Xinerama support for Blackbox 0.70.

12) Why do menus in 0.70 feel slower?

A1: No, it's not your machine at fault. Starting with 0.70, the menus have a built-in delay of 200 ms. This is an accesibility feature of all UI's that implement menus, including GTK and Qt. This slight delay allows people to aim and reach the desired targets easier. While no delay would seem better, it actually causes many people to "miss" quite often. Human eye/hand coordination doesn't really work instantly.

A2: If you want to adjust the delay, change it around line 326 of lib/Menu.cc in the Blackbox source, then recompile Blackbox. Here's the line in question:

  _timer.setTimeout(200);

A rc option is planned, since different people may have better or poorer coordination and they may wish to adjust the delay themselves.


13) Why do I get small boxes in the window titles instead of international characters?

A1: Because the font you're currently using for Blackbox (which is set in the most recently loaded style) doesn't provide those characters. However, fonts provide a "default" glyph for exactly such cases, which usually looks like a small rectangular box. That's what you're seeing.

A2: In case you're wondering how other applications deal with this: they replace the missing glyphs in the current font with glyphs from other fonts installed on the system. However, this technique, called "font merging" is extremely complicated. Usually applications use a ready-made backend such as Pango (for applications using GTK+) or Qt for this. Blackbox can neither afford to use GTK+ or Qt, unless you want those as a dependency, nor to implement font merging from scratch.

A3: The simple solution, as far as dealing with Blackbox is concerned, is to use good Unicode fonts. You can find such fonts via either Alan Wood's* website, or the FLOSS Unicode Font Guide*. Also, gucharmap* is an excellent tool for exploring fonts once you've installed them.


14) Is there a list of all the style resources?

A: Yes. The style file syntax is documented in detail in the README.style file which is distributed with Blackbox. The exact place on your system depends on your package manager, but usually it's somewhere under /usr/share/blackbox/. There is also a copy on this website.


15) I don't like the new buttons in 0.70; is it possible to change them back to 0.65 buttons or modify them?

A1: This is not yet a supported Blackbox feature, but there are plans for allowing styles to define their own buttons at some point in the future.

A2: In 0.65.x buttons were drawn with lines; there were no bitmap definitions for them, so a straight port of the 0.65 buttons to 0.70 is not possible.

FIXME: Anybody got a patch that would change the 0.70 buttons to look like 0.65?

A3: Starting with 0.70, the buttons are defined in the source, so you can DownloadBlackbox source, modify it and recompile it with your modifications. They are defined as a series of arrays, each holding hex numbers. The hex numbers together define 9x9 1-bit bitmaps, with "off" bits being transparent.

Files where arrays are located: lib/Bitmap.cc for left, right and checkbox icon; and in src/ScreenResource.cc for iconify, maximize, restore and close. (Actually, lib/Bitmap.cc also holds icons for up and down arrows, which are currently unused.) They are close to the top of the files; you can't miss them.

Editing the hex values by hand is crazy, so instead use the bitmap utility that comes with X. First, create a new empty text file containing this:

#define _width 9                                         
#define _height 9                                        
static unsigned char _bits[] =                          

Save it wherever you want, let's say ~/bitmap.xbm. Next, copy and paste an array definition (just the two lines holding hex numbers), at the end of the file, so it looks like this:

#define _width 9                                         
#define _height 9                                        
static unsigned char _bits[] =                          
  { 0x00, 0x00, 0x82, 0x00, 0xc6, 0x00, 0x6c, 0x00, 0x38,
    0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x01, 0xff, 0x01 };

Save it again. Run the bitmap utility, and use the left-top menu (click and hold to see options) to load the file. You will have to specify the full path to it. Once loaded, you can use the bitmap controls to edit, rotate and so on. When you're done, save it, then edit both the file and the source file where you took the numbers from, and copy the new numbers to the source. Rinse, repeat. When done, recompile and reinstall Blackbox.


16) How can I explicitly set the toolbar height?

A: You can't, you can only set the width. The reason is simple: the toolbar height is always calculated to allow enough space for the fonts on the toolbar, the borders, the bevels, and so on. Otherwise, we would have awkward situations, such as the user asking for a toolbar 10 pixels high, while the fonts are 15px high. The workarounds for such cases would get very messy very fast and would probably confuse people.


17) How can I change the height (and font size) of the window title bar?

A1: You can change the fonts on the window title bars by editing the current style file which you're using and changing the *font or window.title*font resource. To find out what style file you're currently using, grep your Blackbox config file (usually ~/.blackboxrc for session.styleFile.

continued: This doesn't quite explain the question of size. In fact, of the fonts I tried only one ('Clean') actually produced a noticeable change, and in the process doubled the height of the title bar while making the font smaller. There seems to be more to it than you suggest. What is the exact specification of the resource and its values?

A2: The resources that can affect window title bars are those specified above: *font and window.title*font. They take a font specification in either XLFD format (ie. -sony-fixed-medium-r-normal--0-0-100-100-c-0-iso8859-1 or in FontConfig format (ie. Arial-12:style=Bold or Verdana-10). The height of the title bar is determined from the size of the font, plus the appropriate borders and bevels. Please make sure you're not affected by this issue by testing with the FontConfig format exclusively. If the problem persists, let's discuss this on one of the MailingLists.


18) Is it possible to decide the position and geometry which a certain application will use?

A1: Many X applications accept the -geometry option, or an equivalent (-width, -height and so on).

A2: For applications that don't, or for fine tuning, you can use a window intercept tool such as Devil's Pie, which catches windows based on certain characteristics (including name) and applies all kinds of transformations.


eXTReMe Tracker Hosted by SourceForge.net
Document last modified: Tue, 15 Jun 2010, 20:11 UTC
Home | Sitemap | Last changes RSS Feed | Wiki help | Wiki tools | SandBox
Preferences | Edit this page | View source | Page history | Referrers
Hosted by SourceForge. Powered by Wikki Tikki Tavi. About the website. Terms of use.