Home | Sitemap | Last changes RSS Feed | Wiki help | Wiki tools | SandBox
Preferences | Edit this page | View source | Page history | Referrers
Document last modified: Thu, 15 Feb 2007, 11:29 UTC
Parents: BlackboxFAQ/

Blackbox FAQ/Usage And Features

This FAQ section covers questions related to customizing Blackbox behaviour and usage via the various options it provides. Please observe the other FAQ categories; most often people tend to come to this section for things that are answered in /VisualAppearance.

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 concernes. Let others review the issue too.

1 Why doesn't Blackbox have Alt-Tab support?
2 Why doesn't Blackbox implement some basic kind of Alt-Tab support?
3 How do I pop-up the Blackbox menu via keyboard?
4 I don't have a .blackbox directory, how do I get one?
5 How do I get international language support?
6 How do I run two window managers in a dual head setup, one on each head?
7 How do I enable window-to-window and window-to-edge snapping?
8 Is there a way to create a shortkey to take the active window to the next desktop (as in Sawfish)?
9 How do I access my trash can while running Blackbox?
10 Does Blackbox support Xinerama in the 0.70 release? I don't believe the 0.65 release did.
11 How to automatically set certain EWMH flags when applications start? (start on a certain desktop, sticky, always on top, etc.)
12 How can I use the special buttons on my multimedia keyboard with Blackbox?
13 How do I restore minimized windows? Every time I minimize/iconify a window it disappears.
14 How can I make the workspaces scroll backwards with the mouse wheel?
15 How can I make Blackbox focus new windows without me having to click them?
16 Why can't I move menus around by dragging them by the border?
17 How do I disable the panel/toolbar thing at the bottom?
18 Can I use environment variables inside menu entries?
19 Can I use tilde expansion inside menu entries?
20 Does Blackbox consume a lot of resources? I have a powerful computer and the windows still hang sometimes
21 Does Blackbox (or third party applications) have the ability to configure mouse bindings?
22 How can I make a screenshot?
23 How can I prevent applications from showing up in the toolbar?

1) Why doesn't Blackbox have Alt-Tab support?

A: Blackbox is a window manager, and it's job is to manage windows. It was designed to do one job and do it right, while allowing all kinds of features to be added through the use of third party tools. Keyboard support works and can allow almost limitless control, but it's not implemented by Blackbox. You need bbkeys for that.

When you configure the keyboard shortcuts in bbkeys, Mod1 usually stands for Alt key.

Technically this question should be in the /AddOns FAQ section. But people who ask this most likely don't know that!

2) Why doesn't Blackbox implement some basic kind of Alt-Tab support?

A: Keyboard handling under X works like this: an application comes along and tells X it wants to be notified every time a certain key combination is pressed. Every time that happens, X tells the application. No other application can "grab" that key combination again (the first one who does "wins"). There's also no way to "pass" a combo to another application, short of implementing some sort of communication protocol.

Therefore, in order to implement "backup" Alt-Tab support, Blackbox would have to either implement such a communication protocol, or grab Alt-Tab for itself and never let anyone else use it.

Neither alternative is practical. If Blackbox created a custom protocol, any keyboard handler that wished to work with Blackbox would have to implement it. Result: a grave breach of the Blackbox unwritten policy, which says "follow the standards and work with any tool that also follows standards", and next to zero working keyboard handlers.

Second, if Blackbox grabbed Alt+Tab, users would be prevented from implementing alternatives. There are people who need to use something other than Alt+Tab, for various reasons. Don't simply assume that Alt+Tab is universally valid.

So, in the end, the only elegant solution is to let a keyboard handler such as bbkeys do its job properly and fully.


3) How do I pop-up the Blackbox menu via keyboard?

A1: (This is a workaround discovered by Thomas Tretzmüller). Read answer 2 for a lengthy explanation regarding proper implementation of this feature.)

Go get xnee*. Write the following in a text file somewhere, let's call it ~/.xnee:

# Dimension: 1024x768                                
# DisplayName: :0.0                                  
0,6,0,40,0,0,0,5641654 
0,6,0,40,0,0,0,5641654
0,4,0,0,3,0,0,5641792
0,5,0,0,3,0,0,5641886

Adjust Dimension, DisplayName and 0,40 (on lines 3 and 4) as needed. Then configure your favorite keyboard handler to execute the following shell command upon whatever key combo you want:

cat ~/.xnee | xnee --replay

Every time you trigger this, the mouse cursor jump to coordinates 0,40 (close to the left upper screen corner) and does a right-click. Coordinates 0,40 will most times catch either the empty desktop or the window frame, thus popping-up the Blackbox menu. Next you can use the arrow keys to navigate, Esc to go up and Enter to go down or execute.

Careful with the Esc key. Pressing one too many will execute it in the window you were in. In a terminal, this may trigger an unwanted shell completion. It's best to use the bbkeys key combo again if you want to close the menu.

A2: Right now there is no native support for this feature in neither Blackbox nor bbkeys for this.

As far as Blackbox is concerned, it is committed, for the time being, to keep key handling to an absolute minimum. Implementing this feature would be both a breach of policy and a hack.

It is not possible for both Blackbox and a keyboard handler (such as bbkeys) to respond to a key combo at the same time. Therefore, it would create big problems if Blackbox hardcoded certain key-combos and prevented bbkeys from using them. For instance, don't take for granted the use of Alt+Tab; sometimes, such as during VNC sessions, people have to be able to use Control+Tab, or some other alternative.

On the other hand, bbkeys strives to be a general purpose keyboard handler, while the Blackbox menu is specific to Blackbox. In order for bbkeys to provide this feature it would have to work out with Blackbox a special X Atom which only bbkeys and Blackbox would use to signal the menu pop-up. This would be Blackbox- and X- specific and, again, a hack.

The workaround described at answer 1 can be used with any keyboard handler, and doesn't require any special support in neither the handler nor Blackbox. Even though it is a workaround, it's still much more elegant than the alternatives.


4) I don't have a .blackbox directory, how do I get one?

A: This is indeed annoying for newbies, and has been reported as BlackboxBug:1507165. Please follow the instructions below in order to create a basic Blackbox config structure.

What you need to obtain is this:

~/.blackboxrc      (main config file)
~/.blackbox/       (main directory)
    /backgrounds/  (personal wallpaper directory)
    /styles/       (personal style directory)
    menu           (menu file)

You will need to:


5) How do I get international language support?

A1: The short answer: you don't. Blackbox 0.70.x has disabled internationalization, pending a rewrite of the corresponding support. Blackbox 0.65.x has (outdated) support, but it lacks in other areas (such as interoperability with modern desktop environments and applications).

A2: BradleyHughes has planned a more or less complete rewrite of the internationalization support in the 0.70.x series, but he hasn't gotten around to it so far. It's not a trivial issue, which is why it won't work to simply port over the support from the 0.65.x series. Between the two series there were important advancements in both X and font standards.


6) How do I run two window managers in a dual head setup, one on each head?

A: (SeanPerry) Blackbox now has a -single option, which tells it to only maintain the chosen screen. This is valid starting with version 0.70+.


7) How do I enable window-to-window and window-to-edge snapping?

A1: Window-to-window and window-to-edge snapping and resistance have implemented starting with version 0.70.1. Please see the documentation.

A2: You must edit your rc file and set a non-zero value for the snapping amount of pixels. Zero or absent means disabled, which is the default.


8) Is there a way to create a shortkey to take the active window to the next desktop (as in Sawfish)?

A1: The best solution would be to use a keygrabber (such as bbkeys) and make use if it's specific features. The issue has been addressed in the bbkeys feature request #740764* and proposed patches #1189443* and #1189457*. FIXME: As of the time of this writing, the new functionality has been accepted into bbkeys and will be part of version 1.0.0, whenever that comes out. In the meantime, you can check out a current copy from CVS*.

A2: Here's a workaround, which uses the wmctrl tool and a shell script to achieve the desired result. It is rather strange and slow, and besides you would still need to bind the script to a key, and you end up with the same answer: this kind of support is better suited for being built-in inside the keygrabber. But it's an interesting script so here it goes, a script that moves the currently active window to the next desktop:

#!/bin/bash
#email author at webograph eml cc
let active_desktop=`wmctrl -d |grep "*" | sed "s/\s\+.*$//"`
case $1 in
  right)
    let active_desktop+=1
    if [ "$active_desktop" -g 3 ] # in case you have more or less than 4 desktops, change accordingly
    then
      let active_desktop=0
    fi
  ;;
  left)
    let active_desktop-=1
    if [ "$active_desktop" -l 0 ]
    then
      let active_desktop=3 # same as above
    fi
  ;;
esac;
wmctrl -r :ACTIVE: -t $active_desktop
wmctrl -s $active_desktop

9) How do I access my trash can while running Blackbox?

A1: There is no trash can in Blackbox. You have to understand that the trash can is just a trick employed by some desktop environments. It's actually a regular folder, and when (and only when) you use their file managers and their environment, they move files to that folder instead of deleting them. By design, Blackbox doesn't care what you and various applications do with files anywhere; its job as a window manager is to manage windows, period.

A2: It's possible to run various tools and parts of other desktop environments in parallel with Blackbox, as long as they both respect the NetWM standard (Blackbox does starting with version 0.70). Running Gnome's Nautilus shouldn't be a problem, and it provides desktop icons, a trash can, and a file manager which actually uses that trash can.


10) Does Blackbox support Xinerama in the 0.70 release? I don't believe the 0.65 release did.

A: It only has limited support, meaning that it will show as a big screen spanning across all monitors.


11) How to automatically set certain EWMH flags when applications start? (start on a certain desktop, sticky, always on top, etc.)

A1: Applications are one thing and the window they run in is another. The window manager and the EWMH flags only apply to windows. So you need the application to start and get a window before you can do anything like that.

A2: You can use an addon such as Devil's Pie, which allows you to apply EWMH flags as soon as an application is recognized. You define recognition rules and actions for it, and start it in your ~/.xinitrc.


12) How can I use the special buttons on my multimedia keyboard with Blackbox?

A1: Technically, this doesn't have anything to do with Blackbox, it has to do with X and bbkeys.

A2: ...but what the hell, here it goes. Open an X terminal and run the xev utility. Press the special buttons on your keyboard. If nothing happened (the keys don't produce a reaction) you're out of luck. X doesn't recognize those keys at all. If a reaction appears, watch for the line that contains keycode. It should have a part saying keysym next to it. It may offer a hex code (ie. 0x61) and a keysym name (ie. Next) or it may say 0x0 NoSymbol. If it offers you a keysym name, you can simply use that in bbkeys or the keygrabber utility of your choice; just use xev some more to gather all the names you need.

If you don't get a keysym, all is not lost; you still have a keycode and you can map it to a name that X doesn't use. Look in /usr/X11R6/lib/X11/XKeysymDB for such names; there are some that look like XF86AudioPlay and such which are just right for this. Pick one and the keycode you got from xev and use the xmodmap utility to join them together. The best practice is to create an ~/.Xmodmap file, put xmodmap commands in there, and run xmodmap ~/.Xmodmap when you start X. In this case, the magic command would be this: keycode 138 = XF86AudioPlay (adjust as needed). To run xmodmap ~/.Xmodmap automatically, put it in your ~/.xinitrc or ~/.Xsession. After it loads, you can use the new key name in bbkeys.


13) How do I restore minimized windows? Every time I minimize/iconify a window it disappears.

A: You can find the iconified (minimized) windows under workspaces menu (middle click on the desktop). See BlackboxDocumentation/BlackboxWindows for details about this.


14) How can I make the workspaces scroll backwards with the mouse wheel?

A: See BlackboxPatch:1183577, which implements both behaviours and allows the user to toggle them via the configuration. It has not been accepted into the main source (yet), so you'll need to patch and compile your own source to benefit from this. FIXME: change this note when the patch is closed.


15) How can I make Blackbox focus new windows without me having to click them?

A1: Try changing your focus model. Perhaps the current setting isn't what you wanted.

A2: Make sure you have a config entry in your main Blackbox menu. Go under it and check "Focus New Windows" and "Focus Last Window on Workspace". That's all.

A3: Alternatively, you can edit your ~/.blackboxrc file (or whichever your rc file is) and set session.focusNewWindows and session.focusLastWindow to True. You will have to restart Blackbox if you modify this file.


16) Why can't I move menus around by dragging them by the border?

A: This feature was lost during the conversion from 0.65.x to 0.70, when the menu code was completely rewritten. It may be added back or not, depending if BradleyHughes has the time and incentive. Judging by the fact it hasn't already and it's been a while since 0.70.0 came out, he probably doesn't. So 3rd-party patches are welcome! :)


17) How do I disable the panel/toolbar thing at the bottom?

A1: It's called the toolbar. In versions 0.70.0 and up, you right-click on it (preferably on the clock) and a menu pops up. Navigate it and click on "disable". Alternatively, you can edit the configuration file and disable it there. It's worth noting that the same menu can also be found in the main Blackbox menu, under the [config] section. This helps especially if you want to reenable it.

A2: Earlier Blackbox versions (up to and including 0.65.0) could not disable the toolbar. A trick could be used instead: set its width to 1, using the configuration file, place it in a corner, and activate auto-hide. This would pretty much get it out of the way.


18) Can I use environment variables inside menu entries?

A: Yes, in [exec] entries. Blackbox will resolve environment variables, as long as they were defined at the moment you started X. The following example will work as intended:

[exec] (Program) {program --jdk-home $JDK_HOME}

19) Can I use tilde expansion inside menu entries?

A: All menu directives that expect a file or a command will accept tilde expansion. Read BlackboxDocumentation/BlackboxMenus for details.


20) Does Blackbox consume a lot of resources? I have a powerful computer and the windows still hang sometimes

A1: Blackbox is very light on resources. See BlackboxPerformance for detailed information on this topic.

A2: The insides of the windows are not Blackbox' problem. If you can move windows around and can open the window menu, it means Blackbox is doing its job, regardless of whether the application inside the window reacts or not.

A3: A "powerful" computer by today's standards is really powerful. If you really managed to choke it to the point even Blackbox (a very nimble application) has problems, something is seriously wrong. Check the running processes and find out who's eating away all the power. On desktop systems you sometimes find yourself installing unnecessary stuff which will pile up and run in the background hindering machine performance.


21) Does Blackbox (or third party applications) have the ability to configure mouse bindings?

A1: If you mean customizing what mouse button does what, in respect to Blackbox exclusively, the answer is no. The buttons are hard-wired inside the Blackbox source code for specific actions, depending on what part of the Blackbox interface they act upon. It's always right-click on a window bar that opens the window menu, always right-click on the desktop that brings up the main menu, you always drag a window using left-click, and so on. Technically, implementing customization wouldn't be very hard, but so far nobody has offered code that does this, and the developers didn't feel the need for it.

A2: There are a number of Blackbox patches* that attempt to modify this behaviour. They usually have very specific purposes, such as using left-click for everything, which is useful on Macs with a one-button mouse or on handheld touch-screens. You'll probably need to learn how to use patches.

A3: As far as others application are concerned, the issue doesn't apply. Blackbox doesn't care what applications do with what clicks inside their window.


22) How can I make a screenshot?

A: This has nothing to do with Blackbox itself. There are explanations in the Wikipedia*. You probably have the necessary tools already installed, or you can install them using your system's package management tools. The Gimp* can also take screenshots. Whatever works under environments such as Gnome or KDE will also work under Blackbox.


23) How can I prevent applications from showing up in the toolbar?

A1: There's no way you can really hide windows from the toolbar. The Blackbox toolbar uses its central part to show the name of the currently focused window. When a window gets focus, it shows up, that's it.

A2: Technically, if you could persuade the application to set its window title to a blank string, the toolbar would show nothing.

A3: Did you mean a taskbar? The toolbar is built into Blackbox and works as described at A1. A taskbar, however, is a 3rd-party addon which shows all currently open windows. You can tell windows not to show up in taskbars using EWMH. You can send hints to windows using a window tool.


eXTReMe Tracker Hosted by SourceForge.net
Document last modified: Thu, 15 Feb 2007, 11:29 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.