Fluxbox Deco Bitmasks
It took me ages to get this, and another discussion with mark-t on the IRC chat. Again, because I can't put this on the Fluxbox wiki [although there are signs this might be a menu option!] I'm sticking it here in the hope it helps someone out.
In the apps file for Fluxbox you can control many variables. There's a pretty complete wiki page for this, but one of the things not fully explained is
[Deco] {NONE|NORMAL|TOOL|TINY|BORDER|TAB} Specify the decoration state. There are several predefined decoration sets:
A bitmask can also be used for fine-grained control. The bits are (from "1" to 1<<10): titlebar, handle/grips, border, iconify button, maximize button, close button, menu enabled, sticky button, shade button, tabbing enabled, focus enabled.
- NORMAL - standard decorations
- NONE - no decorations
- BORDER - like NONE except keep the X window border
- TINY - titlebar with an iconify button
- TOOL - titlebar only
- TAB - like NONE except show external tabs only
"What's a bitmask?" I kept asking. What does "1" to 1<<10 MEAN? What am I supposed to put?
Each bit-property is given a value that's based on a power of 2 in ascending order:
Property | Value |
---|---|
titlebar | 1 |
handle/grips | 2 |
border | 4 |
minimize button (called iconify) | 8 |
maximize button | 16 |
close button | 32 |
enable window menu | 64 |
sticky button | 128 |
shade button | 256 |
enable tabbing | 512 |
enable focus | 1024 |
You pick the things you want and then add up the values. So if I wanted a titlebar with just a close button I'd do 1 + 32 = 33 and then enter [Deco] {33} in my apps file.